public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug libelf/26878] New: elflint reports error on SHT_X86_64_UNWIND .eh_frame section
@ 2020-11-13 14:58 tbaeder at redhat dot com
  2020-11-17 13:45 ` [Bug libelf/26878] " mark at klomp dot org
  2020-11-18 11:38 ` mark at klomp dot org
  0 siblings, 2 replies; 3+ messages in thread
From: tbaeder at redhat dot com @ 2020-11-13 14:58 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=26878

            Bug ID: 26878
           Summary: elflint reports error on SHT_X86_64_UNWIND .eh_frame
                    section
           Product: elfutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libelf
          Assignee: unassigned at sourceware dot org
          Reporter: tbaeder at redhat dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 12953
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12953&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libelf/26878] elflint reports error on SHT_X86_64_UNWIND .eh_frame section
  2020-11-13 14:58 [Bug libelf/26878] New: elflint reports error on SHT_X86_64_UNWIND .eh_frame section tbaeder at redhat dot com
@ 2020-11-17 13:45 ` mark at klomp dot org
  2020-11-18 11:38 ` mark at klomp dot org
  1 sibling, 0 replies; 3+ messages in thread
From: mark at klomp dot org @ 2020-11-17 13:45 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=26878

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |mark at klomp dot org

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
(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

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libelf/26878] elflint reports error on SHT_X86_64_UNWIND .eh_frame section
  2020-11-13 14:58 [Bug libelf/26878] New: elflint reports error on SHT_X86_64_UNWIND .eh_frame section tbaeder at redhat dot com
  2020-11-17 13:45 ` [Bug libelf/26878] " mark at klomp dot org
@ 2020-11-18 11:38 ` mark at klomp dot org
  1 sibling, 0 replies; 3+ messages in thread
From: mark at klomp dot org @ 2020-11-18 11:38 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=26878

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
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>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-18 11:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 14:58 [Bug libelf/26878] New: elflint reports error on SHT_X86_64_UNWIND .eh_frame section tbaeder at redhat dot com
2020-11-17 13:45 ` [Bug libelf/26878] " mark at klomp dot org
2020-11-18 11:38 ` mark at klomp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).