Hello, I digged somewhat deeper into the problem and found:
The linker is called 3 times: > $LINKER $EMUL -r -d -o "$OFILE.elf2flt" $ARG1 > $LINKER $EMUL $SDIRS -T $LDSCRIPT -Ur -o "$OFILE.elf" "$OFILE.elf2flt" > $LINKER $EMUL $SDIRS -T $LDSCRIPT -o "$OFILE.gdb" "$OFILE.elf2flt" The flat binary is generated with: > $ELF2FLT -v $FLTFLAGS -o "$OFILE" -p "$OFILE.gdb" "$OFILE.elf" "arm-linux-elf-objdump -h rtest.elf" gives me: > Sections: > Idx Name Size VMA LMA File off Algn > 0 _ZTV5test1 00000008 00000000 00000000 00000034 2**2 > CONTENTS, READONLY, EXCLUDE, GROUP,LINK_ONCE_DISCARD > 1 .text 00004400 00000000 00000000 00000040 2**4 > CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE > 2 .data 00000460 00004400 00004400 00004440 2**4 > CONTENTS, ALLOC, LOAD, RELOC, DATA > 3 .gnu.linkonce.d._ZTV5test1 0000000c 00000000 00000000 000048a0 > 2**2 CONTENTS, ALLOC, LOAD, RELOC, DATA "arm-linux-elf-objdump -h rtest.gdb" gives me: > Sections: > Idx Name Size VMA LMA File off Algn > 0 .text 00004400 00000000 00000000 00008000 2**4 > CONTENTS, ALLOC, LOAD, READONLY, CODE > 1 .data 00000530 00004400 00004400 0000c400 2**4 > CONTENTS, ALLOC, LOAD, DATA You see that in the "abs" file "rtest.gdb", the section .gnu.linkonce.d.* is collapsed int the .data section (as expected in the linker script! But in the "rel" file "rtest.elf" the section is present (it is generated with the SAME linker script!). So the section comparator in elf2flt.c failed: > /* Now search for the equivalent section in the relocation binary > * and use that relocation information to build reloc entries > * for this one. > */ > for (r=rel_bfd->sections; r != NULL; r=r->next) > if (strcmp(a->name, r->name) == 0) > break; > if (r == NULL) > continue; So how is that expected to work? Has the behaviour of ld changed? And how doing the fix? regards Wolfgang regards Wolfgang _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
