[binutils-gdb] ld/x86-64: Also set LAM_U57 when setting LAM_U48
H.J. Lu
hjl@sourceware.org
Sat Jan 9 05:54:06 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ba9e922fa0dfbd7957ef939da3a6b0dbbbaa03cd
commit ba9e922fa0dfbd7957ef939da3a6b0dbbbaa03cd
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Jan 8 21:51:38 2021 -0800
ld/x86-64: Also set LAM_U57 when setting LAM_U48
Since LAM_U48 implies LAM_U57, also set LAM_U57 when setting LAM_U48.
bfd/
* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
LAM_U57 when setting LAM_U48.
ld/
* ld-x86-64/property-x86-lam-u48-4.d: Updated.
* ld-x86-64/property-x86-lam-u48-5.d: Likewise.
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/elfxx-x86.c | 6 ++++--
ld/ChangeLog | 5 +++++
ld/testsuite/ld-x86-64/property-x86-lam-u48-4.d | 2 +-
ld/testsuite/ld-x86-64/property-x86-lam-u48-5.d | 2 +-
5 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 86fec902024..11a2c33b223 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
+ LAM_U57 when setting LAM_U48.
+
2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
PR ld/26256
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 6cfe2bdab15..c47f48257ea 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -2556,10 +2556,12 @@ _bfd_x86_elf_link_setup_gnu_properties
htab->params->cet_report = prop_report_none;
if (htab->params->lam_u48)
{
- features |= GNU_PROPERTY_X86_FEATURE_1_LAM_U48;
+ features |= (GNU_PROPERTY_X86_FEATURE_1_LAM_U48
+ | GNU_PROPERTY_X86_FEATURE_1_LAM_U57);
htab->params->lam_u48_report = prop_report_none;
+ htab->params->lam_u57_report = prop_report_none;
}
- if (htab->params->lam_u57)
+ else if (htab->params->lam_u57)
{
features |= GNU_PROPERTY_X86_FEATURE_1_LAM_U57;
htab->params->lam_u57_report = prop_report_none;
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 1514fd3464a..edbf88628dd 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-x86-64/property-x86-lam-u48-4.d: Updated.
+ * ld-x86-64/property-x86-lam-u48-5.d: Likewise.
+
2021-01-09 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
diff --git a/ld/testsuite/ld-x86-64/property-x86-lam-u48-4.d b/ld/testsuite/ld-x86-64/property-x86-lam-u48-4.d
index 82cd7e2be44..637674ca190 100644
--- a/ld/testsuite/ld-x86-64/property-x86-lam-u48-4.d
+++ b/ld/testsuite/ld-x86-64/property-x86-lam-u48-4.d
@@ -6,6 +6,6 @@
Displaying notes found in: .note.gnu.property
[ ]+Owner[ ]+Data size[ ]+Description
GNU 0x00000030 NT_GNU_PROPERTY_TYPE_0
- Properties: x86 feature: LAM_U48
+ Properties: x86 feature: LAM_U48, LAM_U57
x86 feature used: x86
x86 ISA used:
diff --git a/ld/testsuite/ld-x86-64/property-x86-lam-u48-5.d b/ld/testsuite/ld-x86-64/property-x86-lam-u48-5.d
index 755d0d56e57..623dfbd979c 100644
--- a/ld/testsuite/ld-x86-64/property-x86-lam-u48-5.d
+++ b/ld/testsuite/ld-x86-64/property-x86-lam-u48-5.d
@@ -6,6 +6,6 @@
Displaying notes found in: .note.gnu.property
[ ]+Owner[ ]+Data size[ ]+Description
GNU 0x00000030 NT_GNU_PROPERTY_TYPE_0
- Properties: x86 feature: LAM_U48
+ Properties: x86 feature: LAM_U48, LAM_U57
x86 feature used: x86
x86 ISA used:
More information about the Binutils-cvs
mailing list