aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog16
-rw-r--r--binutils/readelf.c21
-rw-r--r--binutils/testsuite/binutils-all/i386/empty.d2
-rw-r--r--binutils/testsuite/binutils-all/i386/pr21231b.s2
-rw-r--r--binutils/testsuite/binutils-all/x86-64/empty-x32.d2
-rw-r--r--binutils/testsuite/binutils-all/x86-64/empty.d2
-rw-r--r--binutils/testsuite/binutils-all/x86-64/pr21231b.s2
7 files changed, 26 insertions, 21 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 12d4802..3a251e9 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,19 @@
+2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/23900
+ * readelf.c (get_segment_type): Support PT_GNU_PROPERTY.
+ (decode_x86_isa): Don't check GNU_PROPERTY_X86_UINT32_VALID.
+ (decode_x86_feature_1): Likewise.
+ (decode_x86_feature_2): Likewise.
+ (print_gnu_property_note): Remove GNU_PROPERTY_X86_UINT32_VALID
+ check.
+ * testsuite/binutils-all/i386/empty.d: Updated.
+ * testsuite/binutils-all/x86-64/empty-x32.d: Likewise.
+ * testsuite/binutils-all/x86-64/empty.d: Likewise.
+ * testsuite/binutils-all/i386/pr21231b.s: Change
+ GNU_PROPERTY_X86_ISA_1_USED bits to 0x7fffffff.
+ * testsuite/binutils-all/x86-64/pr21231b.s: Likewise.
+
2018-12-13 Sam Tebbs <sam.tebbs@arm.com>
* dwarf.c (read_cie): Add check for 'B'.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 9969e46..dd84a19 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3930,6 +3930,7 @@ get_segment_type (Filedata * filedata, unsigned long p_type)
case PT_GNU_EH_FRAME: return "GNU_EH_FRAME";
case PT_GNU_STACK: return "GNU_STACK";
case PT_GNU_RELRO: return "GNU_RELRO";
+ case PT_GNU_PROPERTY: return "GNU_PROPERTY";
default:
if (p_type >= PT_GNU_MBIND_LO && p_type <= PT_GNU_MBIND_HI)
@@ -17048,13 +17049,11 @@ decode_x86_compat_isa (unsigned int bitmask)
static void
decode_x86_isa (unsigned int bitmask)
{
- if (bitmask == GNU_PROPERTY_X86_UINT32_VALID)
+ if (!bitmask)
{
printf (_("<None>"));
return;
}
- else
- bitmask &= ~GNU_PROPERTY_X86_UINT32_VALID;
while (bitmask)
{
@@ -17147,13 +17146,11 @@ decode_x86_isa (unsigned int bitmask)
static void
decode_x86_feature_1 (unsigned int bitmask)
{
- if (bitmask == GNU_PROPERTY_X86_UINT32_VALID)
+ if (!bitmask)
{
printf (_("<None>"));
return;
}
- else
- bitmask &= ~GNU_PROPERTY_X86_UINT32_VALID;
while (bitmask)
{
@@ -17180,13 +17177,11 @@ decode_x86_feature_1 (unsigned int bitmask)
static void
decode_x86_feature_2 (unsigned int bitmask)
{
- if (bitmask == GNU_PROPERTY_X86_UINT32_VALID)
+ if (!bitmask)
{
printf (_("<None>"));
return;
}
- else
- bitmask &= ~GNU_PROPERTY_X86_UINT32_VALID;
while (bitmask)
{
@@ -17282,13 +17277,7 @@ print_gnu_property_note (Filedata * filedata, Elf_Internal_Note * pnote)
unsigned int bitmask;
if (datasz == 4)
- {
- bitmask = byte_get (ptr, 4);
- if ((filedata->file_header.e_type == ET_EXEC
- || filedata->file_header.e_type == ET_DYN)
- && !(bitmask & GNU_PROPERTY_X86_UINT32_VALID))
- printf ("Invalid ");
- }
+ bitmask = byte_get (ptr, 4);
else
bitmask = 0;
diff --git a/binutils/testsuite/binutils-all/i386/empty.d b/binutils/testsuite/binutils-all/i386/empty.d
index 809280f..3c0e860 100644
--- a/binutils/testsuite/binutils-all/i386/empty.d
+++ b/binutils/testsuite/binutils-all/i386/empty.d
@@ -6,7 +6,7 @@
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
- Properties: x86 feature:
+ Properties: x86 feature: <None>
GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
Properties: x86 ISA used: <None>
x86 feature used: x86
diff --git a/binutils/testsuite/binutils-all/i386/pr21231b.s b/binutils/testsuite/binutils-all/i386/pr21231b.s
index 793e282..1fd2575 100644
--- a/binutils/testsuite/binutils-all/i386/pr21231b.s
+++ b/binutils/testsuite/binutils-all/i386/pr21231b.s
@@ -22,7 +22,7 @@
.long 0xc0010000 /* pr_type. */
.long 4f - 3f /* pr_datasz. */
3:
- .long -1
+ .long 0x7fffffff
4:
.p2align 2
/* GNU_PROPERTY_X86_ISA_1_NEEDED */
diff --git a/binutils/testsuite/binutils-all/x86-64/empty-x32.d b/binutils/testsuite/binutils-all/x86-64/empty-x32.d
index f650374..32cc55e 100644
--- a/binutils/testsuite/binutils-all/x86-64/empty-x32.d
+++ b/binutils/testsuite/binutils-all/x86-64/empty-x32.d
@@ -7,7 +7,7 @@
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
- Properties: x86 feature:
+ Properties: x86 feature: <None>
GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
Properties: x86 ISA used: <None>
x86 feature used: x86
diff --git a/binutils/testsuite/binutils-all/x86-64/empty.d b/binutils/testsuite/binutils-all/x86-64/empty.d
index 30a2ea4..3cc52ba 100644
--- a/binutils/testsuite/binutils-all/x86-64/empty.d
+++ b/binutils/testsuite/binutils-all/x86-64/empty.d
@@ -6,7 +6,7 @@
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
- Properties: x86 feature:
+ Properties: x86 feature: <None>
GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0
Properties: x86 ISA used: <None>
x86 feature used: x86
diff --git a/binutils/testsuite/binutils-all/x86-64/pr21231b.s b/binutils/testsuite/binutils-all/x86-64/pr21231b.s
index add9227..8fefebd 100644
--- a/binutils/testsuite/binutils-all/x86-64/pr21231b.s
+++ b/binutils/testsuite/binutils-all/x86-64/pr21231b.s
@@ -22,7 +22,7 @@
.long 0xc0010000 /* pr_type. */
.long 4f - 3f /* pr_datasz. */
3:
- .long -1
+ .long 0x7fffffff
4:
.p2align 3
/* GNU_PROPERTY_X86_ISA_1_NEEDED */