diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-10-13 05:20:49 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-10-13 05:21:05 -0700 |
commit | 586e30940e640f67bd55bd72e1d1355a4faf8079 (patch) | |
tree | 278d223a2c3820c46af259ed69fbd381f9d331d6 /gold/testsuite | |
parent | 6bf4a34047452f882c5cc66bd85812ee1bb5a41c (diff) | |
download | fsf-binutils-gdb-586e30940e640f67bd55bd72e1d1355a4faf8079.zip fsf-binutils-gdb-586e30940e640f67bd55bd72e1d1355a4faf8079.tar.gz fsf-binutils-gdb-586e30940e640f67bd55bd72e1d1355a4faf8079.tar.bz2 |
gold: Update GNU_PROPERTY_X86_XXX macros
This patch updates GNU_PROPERTY_X86_XXX macros for gold:
1. GNU_PROPERTY_X86_UINT32_AND_XXX: A 4-byte unsigned integer property.
A bit is set if it is set in all relocatable inputs:
#define GNU_PROPERTY_X86_UINT32_AND_LO 0xc0000002
#define GNU_PROPERTY_X86_UINT32_AND_HI 0xc0007fff
2. GNU_PROPERTY_X86_UINT32_OR_XXX: A 4-byte unsigned integer property.
A bit is set if it is set in any relocatable inputs:
#define GNU_PROPERTY_X86_UINT32_OR_LO 0xc0008000
#define GNU_PROPERTY_X86_UINT32_OR_HI 0xc000ffff
3. GNU_PROPERTY_X86_UINT32_OR_AND_XXX: A 4-byte unsigned integer property.
A bit is set if it is set in any relocatable inputs and the property is
present in all relocatable inputs:
#define GNU_PROPERTY_X86_UINT32_OR_AND_LO 0xc0010000
#define GNU_PROPERTY_X86_UINT32_OR_AND_HI 0xc0017fff
4. GNU_PROPERTY_X86_FEATURE_2_NEEDED, GNU_PROPERTY_X86_FEATURE_2_USED
and GNU_PROPERTY_X86_FEATURE_2_XXX bits.
GNU_PROPERTY_X86_FEATURE_1_AND is unchanged. GNU_PROPERTY_X86_ISA_1_USED
and GNU_PROPERTY_X86_ISA_1_NEEDED are updated to better support targeted
processors since GNU_PROPERTY_X86_ISA_1_?86 aren't isn't very useful.
A new set of GNU_PROPERTY_X86_ISA_1_XXX bits are defined. The previous
GNU_PROPERTY_X86_ISA_1_XXX macros are deprecated and renamed to
GNU_PROPERTY_X86_COMPAT_ISA_1_XXX and GNU_PROPERTY_X86_COMPAT_2_ISA_1_XXX.
elfcpp/
* elfcpp.h (GNU_PROPERTY_X86_ISA_1_USED): Renamed to ...
(GNU_PROPERTY_X86_COMPAT_ISA_1_USED): This.
(GNU_PROPERTY_X86_ISA_1_NEEDED): Renamed to ...
(GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED): This.
(GNU_PROPERTY_X86_UINT32_AND_LO): New.
(GNU_PROPERTY_X86_UINT32_AND_HI): Likewise.
(GNU_PROPERTY_X86_UINT32_OR_LO): Likewise.
(GNU_PROPERTY_X86_UINT32_OR_HI): Likewise.
(GNU_PROPERTY_X86_UINT32_OR_AND_LO): Likewise.
(GNU_PROPERTY_X86_UINT32_OR_AND_HI): Likewise.
(GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED): New.
(GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED): Likewise.
(GNU_PROPERTY_X86_FEATURE_1_AND): Updated to
(GNU_PROPERTY_X86_UINT32_AND_LO + 0).
(GNU_PROPERTY_X86_ISA_1_NEEDED): New. Defined to
GNU_PROPERTY_X86_UINT32_OR_LO + 2.
(GNU_PROPERTY_X86_FEATURE_2_NEEDED): New. Defined to
(GNU_PROPERTY_X86_UINT32_OR_LO + 1).
(GNU_PROPERTY_X86_ISA_1_USED): New. Defined to
GNU_PROPERTY_X86_UINT32_OR_AND_LO + 2.
(GNU_PROPERTY_X86_FEATURE_2_USED): New. Defined to
(GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1).
gold/
* x86_64.cc (Target_x86_64::Target_x86_64): Initialize
feature_2_used_, feature_2_needed_ and object_feature_2_used_.
(Target_x86_64::feature_2_used_): New data member.
(Target_x86_64::feature_2_needed_): Likewise.
(Target_x86_64::object_isa_1_used_): Likewise.
(Target_x86_64::record_gnu_property): Support
GNU_PROPERTY_X86_COMPAT_ISA_1_USED,
GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED,
GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED,
GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED,
GNU_PROPERTY_X86_FEATURE_2_USED and
GNU_PROPERTY_X86_FEATURE_2_NEEDED.
(Target_x86_64::merge_gnu_properties): Merge FEATURE_2_USED bits.
Initialize object_feature_2_used_.
(Target_x86_64::do_finalize_gnu_properties): Support
GNU_PROPERTY_X86_FEATURE_2_USED and
GNU_PROPERTY_X86_FEATURE_2_NEEDED.
* testsuite/gnu_property_a.S (GNU_PROPERTY_X86_ISA_1_USED): Set
to 0xc0010002.
(GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
* testsuite/gnu_property_b.S (GNU_PROPERTY_X86_ISA_1_USED): Set
to 0xc0010002.
(GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
* testsuite/gnu_property_c.S (GNU_PROPERTY_X86_ISA_1_USED): Set
to 0xc0010002.
(GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
* testsuite/gnu_property_test.sh: Updated.
Diffstat (limited to 'gold/testsuite')
-rw-r--r-- | gold/testsuite/gnu_property_a.S | 4 | ||||
-rw-r--r-- | gold/testsuite/gnu_property_b.S | 4 | ||||
-rw-r--r-- | gold/testsuite/gnu_property_c.S | 4 | ||||
-rwxr-xr-x | gold/testsuite/gnu_property_test.sh | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/gold/testsuite/gnu_property_a.S b/gold/testsuite/gnu_property_a.S index 463bc8e..5fbbbc9 100644 --- a/gold/testsuite/gnu_property_a.S +++ b/gold/testsuite/gnu_property_a.S @@ -1,8 +1,8 @@ #define NT_GNU_PROPERTY_TYPE_0 5 #define GNU_PROPERTY_STACK_SIZE 1 -#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 -#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 +#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002 +#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002 #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 #if __SIZEOF_PTRDIFF_T__ == 8 diff --git a/gold/testsuite/gnu_property_b.S b/gold/testsuite/gnu_property_b.S index 0c0c038..7028f73 100644 --- a/gold/testsuite/gnu_property_b.S +++ b/gold/testsuite/gnu_property_b.S @@ -2,8 +2,8 @@ #define GNU_PROPERTY_STACK_SIZE 1 #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2 -#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 -#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 +#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002 +#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002 #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 #if __SIZEOF_PTRDIFF_T__ == 8 diff --git a/gold/testsuite/gnu_property_c.S b/gold/testsuite/gnu_property_c.S index ace159a..c8cbd8b 100644 --- a/gold/testsuite/gnu_property_c.S +++ b/gold/testsuite/gnu_property_c.S @@ -2,8 +2,8 @@ #define GNU_PROPERTY_STACK_SIZE 1 #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2 -#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 -#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 +#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002 +#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002 #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 #if __SIZEOF_PTRDIFF_T__ == 8 diff --git a/gold/testsuite/gnu_property_test.sh b/gold/testsuite/gnu_property_test.sh index 1806d34..a409600 100755 --- a/gold/testsuite/gnu_property_test.sh +++ b/gold/testsuite/gnu_property_test.sh @@ -77,8 +77,8 @@ check_count gnu_property_test.stdout "^ NOTE" 2 check gnu_property_test.stdout "stack size: 0x111100" check gnu_property_test.stdout "no copy on protected" -check gnu_property_test.stdout "x86 ISA used: i486, SSE2, SSE4_2, AVX512CD" -check gnu_property_test.stdout "x86 ISA needed: i486, SSE2, SSE4_2, AVX512CD" +check gnu_property_test.stdout "x86 ISA used: x86-64-v2, <unknown: 10>, <unknown: 100>, <unknown: 1000>" +check gnu_property_test.stdout "x86 ISA needed: x86-64-v2, <unknown: 10>, <unknown: 100>, <unknown: 1000>" check gnu_property_test.stdout "x86 feature: IBT" exit 0 |