Recent versions of clang use the ABI-suggested SHT_X86_64_UNWIND section type for the stack unwinding information in .eh_frame. elfutils does not handle this well. readelf shows the section type as "SHT_LOPROC+1", and elflint reports an error. bash-4.2$ cat t.c void f2(); void f1() { f2(); } bash-4.2$ clang -c t.c bash-4.2$ readelf --version readelf (elfutils) 0.166 Copyright (C) 2012 Red Hat, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Ulrich Drepper. bash-4.2$ readelf -S t.o There are 9 section headers, starting at offset 0x1a8: Section Headers: [Nr] Name Type Addr Off Size ES Flags Lk Inf Al [ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 [ 1] .strtab STRTAB 0000000000000000 00000158 0000004e 0 0 0 1 [ 2] .text PROGBITS 0000000000000000 00000040 0000000d 0 AX 0 0 16 [ 3] .rela.text RELA 0000000000000000 00000128 00000018 24 8 2 8 [ 4] .comment PROGBITS 0000000000000000 0000004d 00000028 1 MS 0 0 1 [ 5] .note.GNU-stack PROGBITS 0000000000000000 00000075 00000000 0 0 0 1 [ 6] .eh_frame SHT_LOPROC+1 0000000000000000 00000078 00000038 0 A 0 0 8 [ 7] .rela.eh_frame RELA 0000000000000000 00000140 00000018 24 8 6 8 [ 8] .symtab SYMTAB 0000000000000000 000000b0 00000078 24 1 3 8 bash-4.2$ elflint t.o section [ 3] '.rela.text': relocation 0: invalid type section [ 6] '.eh_frame' has unsupported type 1879048193 section [ 7] '.rela.eh_frame': invalid destination section type section [ 7] '.rela.eh_frame': relocation 0: invalid type
Do you have a pointer to the spec that defines this? Is this just for .eh_frame (which is currently just SHT_PROGBITS)? Or also .eh_frame_hdr? The first step would be to add submit this new constant to the glibc project elf.h header. Other projects take elf.h from glibc and use those definitions.
Note to the reporter that this bug is both marked as "private", but also filed against Fedora. That means it is not really private. It is public to the reporter, some internal Red Hat groups and all fedora hackers subscribed to elfutils bugs (see the CC list).
The x86_64 ABI documents SHT_X86_64_UNWIND in 4.2.2 - 4.2.4: http://www.x86-64.org/documentation/abi.pdf. I'm not sure about .eh_frame_hdr. The ABI doesn't mention it. As far as I can tell, ld always uses SHT_PROGBITS, but that is not very conclusive. I'll raise the issue on the ABI mailing list. I submitted this request to get SHT_X86_64_UNWIND added to elf.h: https://sourceware.org/bugzilla/show_bug.cgi?id=20079 Sorry about the public vs. private confusion. My intent in checking multiple boxes was to make the report visible to anyone.
(In reply to David L Kreitzer from comment #3) > The x86_64 ABI documents SHT_X86_64_UNWIND in 4.2.2 - 4.2.4: > http://www.x86-64.org/documentation/abi.pdf. > > I'm not sure about .eh_frame_hdr. The ABI doesn't mention it. As far as I > can tell, ld always uses SHT_PROGBITS, but that is not very conclusive. I'll > raise the issue on the ABI mailing list. Thanks. > I submitted this request to get SHT_X86_64_UNWIND added to elf.h: > https://sourceware.org/bugzilla/show_bug.cgi?id=20079 I added myself to the CC of that bug. > Sorry about the public vs. private confusion. My intent in checking multiple > boxes was to make the report visible to anyone. Aha, checking any box makes the bug private to those groups. If you want it to become a public bug, then no group box needs to be checked.
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'.
This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.