Created attachment 12953 [details] elfstrmerge.o compiled with clang gold and clang seem to emit .eh_frame sections of type SHT_X86_64_UNWIND. If they are used to compile elfutils itself, the testsuite will use one of the .o files in tests/ and run elflint against it and check the output. elflint will then complain: elflint /home/tbaeder/elfutils/build-clang/tests/elfstrmerge.o section [19] '.rela.eh_frame': invalid destination section type Attached is the tests/elfstrmerge.o of an elfutils build with clang, which exhibits this problem.
(In reply to Timm Bäder from comment #0) > Created attachment 12953 [details] > elfstrmerge.o compiled with clang > > gold and clang seem to emit .eh_frame sections of type SHT_X86_64_UNWIND. And we already handle gold, which (normally) outputs .eh_frame (and .eh_frame_hdr) without any relocations (because that is what a linker does, resolve the relocations :). So for non-ET_REL files we already seem to handle SHT_X86_64_UNWIND see: commit 22ec8efc1dd87cdc7892523457eb55990b967224 Author: Mark Wielaard <mark@klomp.org> Date: Sat Nov 10 23:33:03 2018 +0100 elflint: Allow PT_GNU_EH_FRAME segment to match SHT_X86_64_UNWIND section. The gold linker might generate an .eh_frame_hdr with a SHT_X86_64_UNWIND type instead of a SHT_PROGBITS type. Signed-off-by: Mark Wielaard <mark@klomp.org> commit 4b0342b85b5b1a3d3636e06e3b5320954828dfb1 Author: Mark Wielaard <mark@klomp.org> Date: Tue Nov 6 12:01:25 2018 +0100 backends: Add x86_64 section_type_name for SHT_X86_64_UNWIND. Makes sure that eu-readelf and eu-elflint recognize and show the x86_64 specific section type correctly. Signed-off-by: Mark Wielaard <mark@klomp.org> Tested-by: Milian Wolff <milian.wolff@kdab.com> And I see that Navin just posted a fix for eblcheckreloctargettype: https://sourceware.org/pipermail/elfutils-devel/2020q4/003127.html
commit 00a25cf38d56bacae6b82c79cf226c22d12295a5 Author: Mark Wielaard <mark@klomp.org> Date: Tue Nov 17 15:08:05 2020 +0100 backends: Handle SHT_X86_64_UNWIND as valid relocation target type. The x86_64 abi defines a special section type for .eh_frame[_hdr], SHT_X86_64_UNWIND, which is a valid relocation target type. https://sourceware.org/bugzilla/show_bug.cgi?id=26878 Signed-off-by: Mark Wielaard <mark@klomp.org>