From aa7bca9b2e30cf128966631382731369f7b753d8 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 24 Aug 2018 04:37:45 -0700 Subject: x86: Add GNU_PROPERTY_X86_UINT32_VALID The older linker treats .note.gnu.property section as a generic note and just concatenates all .note.gnu.property sections from the input to the output. On CET-enabled OS, the output of the older linker is marked as CET enabled, but in fact, it is not CET enabled and it crashes on CET-enabled machines. This patch defines GNU_PROPERTY_X86_UINT32_VALID. Linker is updated to set the GNU_PROPERTY_X86_UINT32_VALID bit in GNU property note for non-relocatable output to differentiate outputs from the older linker. bfd/ * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the GNU_PROPERTY_X86_UINT32_VALID bit. (_bfd_x86_elf_link_fixup_gnu_properties): Set the GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output. binutils/ * readelf.c (print_gnu_property_note): Check the GNU_PROPERTY_X86_UINT32_VALID bit for invalid GNU property note. include/ * elf/common.h (GNU_PROPERTY_X86_UINT32_VALID): New. --- bfd/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bfd/ChangeLog') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1cadfc4..44690b8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2018-08-24 H.J. Lu + + * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the + GNU_PROPERTY_X86_UINT32_VALID bit. + (_bfd_x86_elf_link_fixup_gnu_properties): Set the + GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output. + 2018-08-23 Zenith423 PR 23460 -- cgit v1.1