[llvm-dev] [RFC] Making .eh_frame more linker-friendly
George Rimar via llvm-dev
llvm-dev at lists.llvm.org
Wed Nov 29 00:42:28 PST 2017
>> With GNU gold (GNU Binutils 184.108.40.20671006) 1.14 have an assert:
>> ~/LLVM/Release/bin/clang++ test.cpp -ffunction-sections -o test.o
>> /usr/local/bin/ld: internal error in layout_eh_frame_section, at
>> It is that place:
>> Did not investigate it, but it looks it is place
>> mentioned in comment for
>I've committed a patch in gold that should fix this problem:
>Can you try gold again with this patch applied? You should at least
>get a little further.
>If it still doesn't work, could I trouble you for a sample object file?
I'll try it soon and return with results, thanks !
Just a small clarification: your commit message saying that "LLVM is experimenting with placing
.eh_frame sections in the COMDAT group", that is true for original experiment which faced this gold issue
(https://marc.info/?l=llvm-commits&m=144683596826489), current approach I am experimented
with (https://reviews.llvm.org/D40352) sets sh_link of .eh_frame to corresponding .text section instead.
Though anyways issue looks to be that gold did not like to have multiple .eh_frame sections and that
is what both approaches faced with and your patch seeems fixes that.
More information about the llvm-dev