bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/23428] ld does not put program headers in a code-only load segme


From: hjl.tools at gmail dot com
Subject: [Bug ld/23428] ld does not put program headers in a code-only load segment
Date: Sat, 11 Aug 2018 06:41:17 +0000

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

--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to nsz from comment #14)
> > @Szabolcs: If you rebuild gcc-8 on Debian testing with "--enable-cet=auto"
> > added to CONFARGS in debian/rules2, then you should be able to reproduce the
> > musl-gcc crash (after removing the --build-id workaround from 
> > musl-gcc.specs!).
> > 
> > (It appears that "--enable-cet=auto" is the important difference between 
> > Arch's
> > and Debian's GCC packages.)
> 
> thanks, i could reproduce the issue:
> 
> it seems ld tries to add a dummy .note.gnu.property to force the
> program headers into a load segment, but if there is already a
> .note.gnu.property in some of the input object files then it just
> tries to merge those and don't add a dummy note at all, however
> the merging rules may produce an empty note in the end and then
> the note section is dropped.

Please try binutils master branch with

commit f7309df20c4e787041cedc4a6aced89c15259e54
Author: H.J. Lu <address@hidden>
Date:   Wed Aug 8 06:09:15 2018 -0700

    x86: Properly merge GNU_PROPERTY_X86_ISA_1_USED

    Without the GNU_PROPERTY_X86_ISA_1_USED property, all ISAs may be used.
    If a bit in the GNU_PROPERTY_X86_ISA_1_USED property is unset, the
    corresponding x86 instruction set isn\u2019t used.  When merging properties
    from 2 input files and one input file doesn't have the
    GNU_PROPERTY_X86_ISA_1_USED property, the output file shouldn't have
    it neither.  This patch removes the GNU_PROPERTY_X86_ISA_1_USED
    property if an input file doesn't have it.

    This patch replaces the GNU_PROPERTY_X86_ISA_1_USED property with the
    GNU_PROPERTY_X86_ISA_1_NEEDED property which is the minimum ISA
    requirement.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]