Open llvmbot opened 12 years ago
As suggested here http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-May/021478.html I manually edited generated asm replacing section symbol (.text._Z3barIiEiT_
) in "FDE initial location" in .eh_frame
with function symbol (_Z3barIiEiT_
).
And after assembling linking went fine.
According to ELF std related to COMDAT section groups:
http://www.sco.com/developers/gabi/latest/ch4.sheader.html#section_groups
A symbol table entry with STB_LOCAL
binding that is defined relative to one of a group's sections, and that is contained in a symbol table section that is not part of the group, must be discarded if the group members are discarded. References to this symbol table entry from outside the group are not allowed.
Extended Description
Hello!
I faced the following problem with clang and Solaris linker when building code that contains COMDAT groups with section containing template function instantiations.
So the linker successfully discarded .text.Z3barIiEiT in b.o in favor of the one in a.o
But it got problems when processing relocations for .eh_frame section in b.o
The second relocation entry in .rel.eh_frame references section symbol
[5].text._Z3barIiEiT_
which isLOCAL
and thus is discarded with discarded section.text._Z3barIiEiT_