Bug 25511 - unknown program header entry type 0x6474e553
Summary: unknown program header entry type 0x6474e553
Status: RESOLVED FIXED
Alias: None
Product: elfutils
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Mark Wielaard
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-05 19:14 UTC by Aaron Merey
Modified: 2020-02-18 12:49 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
readelf, elflint: Handle PT_GNU_PROPERTY (7.24 KB, patch)
2020-02-08 20:52 UTC, Mark Wielaard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Merey 2020-02-05 19:14:14 UTC
On ubuntu 19.10 x86_64 run-strip-strmerge.sh, run-elflint-self.sh and run-reverse-sections-self.sh all with the same error: "program header entry 9: unknown program header entry type 0x6474e553". 

This is caused by the inclusion of a new ELF program header PT_GNU_PROPERTY in newer binutils. For more information see https://bugzilla.redhat.com/show_bug.cgi?id=1748802

Steps to reproduce on ubuntu 19.10 x86_64: `./configure; make; make check TESTS='run-strip-strmerge.sh run-elflint-self.sh run-reverse-sections-self.sh'`

tests/test-suite.log:
FAIL: run-strip-strmerge.sh
===========================

elflint /home/amerey/elfutils/tests/elfstrmerge
program header entry 9: unknown program header entry type 0x6474e553
FAIL run-strip-strmerge.sh (exit status: 1)

FAIL: run-elflint-self.sh
=========================

program header entry 9: unknown program header entry type 0x6474e553
*** failure in /home/amerey/elfutils/src/elflint --quiet --gnu-ld /home/amerey/elfutils/src/addr2line
program header entry 9: unknown program header entry type 0x6474e553
*** failure in /home/amerey/elfutils/src/elflint --quiet --gnu-ld /home/amerey/elfutils/src/elfclassify
program header entry 9: unknown program header entry type 0x6474e553
*** failure in /home/amerey/elfutils/src/elflint --quiet --gnu-ld /home/amerey/elfutils/src/stack
program header entry 9: unknown program header entry type 0x6474e553
*** failure in /home/amerey/elfutils/src/elflint --quiet --gnu-ld /home/amerey/elfutils/src/unstrip
program header entry 8: unknown program header entry type 0x6474e553
*** failure in /home/amerey/elfutils/src/elflint --quiet --gnu-ld /home/amerey/elfutils/libelf/libelf.so
program header entry 8: unknown program header entry type 0x6474e553
*** failure in /home/amerey/elfutils/src/elflint --quiet --gnu-ld /home/amerey/elfutils/libasm/libasm.so
FAIL run-elflint-self.sh (exit status: 1)

FAIL: run-reverse-sections-self.sh
==================================


copy_elf: /home/amerey/elfutils/src/addr2line -> addr2line.rev (read,reverse)
setshstrndx: 38
Swapping offsets of section 28 and 29
Swapping offsets of section 30 and 31
Swapping offsets of section 32 and 33
Swapping offsets of section 34 and 35
Swapping offsets of section 37 and 38
program header entry 9: unknown program header entry type 0x6474e553
FAIL run-reverse-sections-self.sh (exit status: 1)
Comment 1 Mark Wielaard 2020-02-08 20:52:14 UTC
Created attachment 12275 [details]
readelf, elflint: Handle PT_GNU_PROPERTY

    binutils 2.32 ld emits a new PT_GNU_PROPERTY segment that overlaps
    with the PT_NOTE segment covering the .note.gnu.property section data.
Comment 2 Mark Wielaard 2020-02-18 12:39:33 UTC
I requested some more background information on this:
https://sourceware.org/ml/gnu-gabi/2020-q1/msg00000.html

But since it is now emitted in production binaries lets handle it as is for now.
Comment 3 Mark Wielaard 2020-02-18 12:49:19 UTC
commit c4600ae002c8a8738035ec5f80e818171811c9d4
Author: Mark Wielaard <mark@klomp.org>
Date:   Sat Feb 8 21:40:27 2020 +0100

    readelf, elflint: Handle PT_GNU_PROPERTY.
    
    binutils 2.32 ld emits a new PT_GNU_PROPERTY segment that overlaps
    with the PT_NOTE segment covering the .note.gnu.property section data.
    
    https://sourceware.org/bugzilla/show_bug.cgi?id=25511
    
    Signed-off-by: Mark Wielaard <mark@klomp.org>