From 1fc87489b40b3100badf184a7c266387bae47def Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 8 Mar 2017 07:44:04 -0800 Subject: Properly dump NT_GNU_PROPERTY_TYPE_0 Property type and datasz are always 4 bytes for both 32-bit and 64-bit objects. Property values for GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED are 4 bytes for both i386 and x86-64 objects. We should also check GNU_PROPERTY_LOPROC and GNU_PROPERTY_LOUSER. binutils/ PR binutils/21231 * readelf.c (decode_x86_isa): Change argument to unsigned int. (print_gnu_property_note): Retrieve property type and datasz as 4-byte integer. Consolidate property datasz check. Check GNU_PROPERTY_LOPROC and GNU_PROPERTY_LOUSER. * testsuite/binutils-all/i386/pr21231a.d: New file. * testsuite/binutils-all/i386/pr21231a.s: Likewise. * testsuite/binutils-all/i386/pr21231b.d: Likewise. * testsuite/binutils-all/i386/pr21231b.s: Likewise. * testsuite/binutils-all/x86-64/pr21231a.d: Likewise. * testsuite/binutils-all/x86-64/pr21231a.s: Likewise. * testsuite/binutils-all/x86-64/pr21231b.d: Likewise. * testsuite/binutils-all/x86-64/pr21231b.s: Likewise. include/ PR binutils/21231 * elf/common.h (GNU_PROPERTY_LOPROC): New. (GNU_PROPERTY_HIPROC): Likewise. (GNU_PROPERTY_LOUSER): Likewise. (GNU_PROPERTY_HIUSER): Likewise. --- include/ChangeLog | 8 ++++++++ include/elf/common.h | 10 ++++++++++ 2 files changed, 18 insertions(+) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index 904c20a..2cdad3f 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,11 @@ +2017-03-08 H.J. Lu + + PR binutils/21231 + * elf/common.h (GNU_PROPERTY_LOPROC): New. + (GNU_PROPERTY_HIPROC): Likewise. + (GNU_PROPERTY_LOUSER): Likewise. + (GNU_PROPERTY_HIUSER): Likewise. + 2017-03-01 Nick Clifton * elf/common.h (SHF_GNU_BUILD_NOTE): Define. diff --git a/include/elf/common.h b/include/elf/common.h index 2b9bca6..f45c256 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -695,6 +695,16 @@ /* Values used in GNU .note.gnu.property notes (NT_GNU_PROPERTY_TYPE_0). */ #define GNU_PROPERTY_STACK_SIZE 1 #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2 + +/* Processor-specific semantics, lo */ +#define GNU_PROPERTY_LOPROC 0xc0000000 +/* Processor-specific semantics, hi */ +#define GNU_PROPERTY_HIPROC 0xdfffffff +/* Application-specific semantics, lo */ +#define GNU_PROPERTY_LOUSER 0xe0000000 +/* Application-specific semantics, hi */ +#define GNU_PROPERTY_HIUSER 0xffffffff + #define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 #define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 -- cgit v1.1