This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Wed, Jan 03, 2007 at 05:55:09PM +0800, Jie Zhang wrote:This assert assures both calculations are equal and catches nontrivial bugs early.
When come to this specific bug, the relocation of the going-to-be-removed .eh_frame is counted in bfinfdpic_check_relocs. Since it's not remove by garbage collection, it's count not decremented by bfinfdpic_gc_sweep_hook. Then the .eh_frame is optimized away since all its entries have been removed. Thus bfinfdpic_relocate_section cannot see this .eh_frame section and it's relocations are not counted. The assert bangs!
Can you provide a testcase? I would have thought that
$ cat test.cpp #include <iostream> int main () {return 0;}
$ bfin-uclinux-g++ -mfdpic -ffunction-sections -o test -Wl,--gc-sections test.cpp
Before checking if SEC_RELOC is set for each input section, elf_link_input_bfd checks its linker_mark:relocate_section would be called even though SEC_EXCLUDE is set, since presumably SEC_RELOC is also set for the input section. I must be missing something..
if (! o->linker_mark) { /* This section was omitted from the link. */ continue; }
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |