This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Check multiple NT_GNU_PROPERTY_TYPE_0 notes [BZ #23509]


On 08/16/2018 01:39 PM, H.J. Lu wrote:

Please show the output of "readelf -n".  I believe that all
NT_GNU_PROPERTY_TYPE_0
notes are in a single PT_NOTE segment.

There is just one property note because the linker has property note merging support:

Displaying notes found in: .note.ABI-tag
  Owner                 Data size       Description
  GNU                  0x00000010       NT_GNU_ABI_TAG (ABI version tag)
    OS: Linux, ABI: 3.2.0

Displaying notes found in: .note.gnu.property
  Owner                 Data size       Description
  GNU                  0x00000020       NT_GNU_PROPERTY_TYPE_0
      Properties: x86 ISA used:
        x86 ISA needed:

Displaying notes found in: .note.gnu.build-id
  Owner                 Data size       Description
GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring)
    Build ID: 5bd43ed7376c4734e49138a6bddb15dc0d0002a6

My patch checks each PT_LOAD segment
until a NT_GNU_PROPERTY_TYPE_0 note is found.  If more than one note is found,
it disables CET since the binary was created by the older linker.

I assumed the patch stopped searching once it finds a segment with a single NT_GNU_PROPERTY_TYPE_0 note. I'm still worried that this might be a problem, considering that ld produces multiple segments in some cases (but the triggering conditions for that aren't entirely clear to me).

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]