=================================================================== RCS file: /cvs/prex-old/boot/i386/i386/elf_reloc.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -r1.1.1.1 -r1.1.1.1.2.1 --- prex-old/boot/i386/i386/elf_reloc.c 2008/06/03 10:38:41 1.1.1.1 +++ prex-old/boot/i386/i386/elf_reloc.c 2008/08/13 17:12:20 1.1.1.1.2.1 @@ -31,6 +31,12 @@ #include #include +#ifdef DEBUG_ELF +#define DPRINTF(a) printf a +#else +#define DPRINTF(a) +#endif + int relocate_rel(Elf32_Rel *rel, Elf32_Addr sym_val, char *target_sect) { @@ -43,14 +49,14 @@ break; case R_386_32: *where += (Elf32_Addr)phys_to_virt(sym_val); - elf_print("R_386_32: %x -> %x\n", where, *where); + DPRINTF(("R_386_32: %x -> %x\n", where, *where)); break; case R_386_PC32: *where += sym_val - (Elf32_Addr)where; - elf_print("R_386_PC32: %x -> %x\n", where, *where); + DPRINTF(("R_386_PC32: %x -> %x\n", where, *where)); break; default: - panic("relocation fail\n"); + panic("relocation fail"); return -1; } return 0; @@ -60,6 +66,6 @@ relocate_rela(Elf32_Rela *rela, Elf32_Addr sym_val, char *target_sec) { - panic("Invalid relocation type\n"); + panic("invalid relocation type"); return -1; }