x86: Support GNU_PROPERTY_X86_ISA_1_BASELINE marker
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 30 Oct 2020 13:49:57 +0000 (06:49 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 30 Oct 2020 13:50:10 +0000 (06:50 -0700)
commitb0ab06937385e0ae25cebf1991787d64f439bf12
tree110bed6d54e311deb8ac7328204da7846b789a45
parenta984d94aab7279416021ad320af22093f3e26d48
x86: Support GNU_PROPERTY_X86_ISA_1_BASELINE marker

GCC 11 supports -march=x86-64-v[234] to enable x86 micro-architecture ISA
levels:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97250

X86 ISA markers are updated:

https://gitlab.com/x86-psABIs/x86-64-ABI/-/merge_requests/13

GNU_PROPERTY_X86_ISA_1_BASELINE is added and GNU_PROPERTY_X86_ISA_1_V[234]
are updated:

 #define GNU_PROPERTY_X86_ISA_1_BASELINE (1U << 0)
 #define GNU_PROPERTY_X86_ISA_1_V2       (1U << 1)
 #define GNU_PROPERTY_X86_ISA_1_V3       (1U << 2)
 #define GNU_PROPERTY_X86_ISA_1_V4       (1U << 3)

Add -z x86-64-baseline linker command line option to mark x86-64-baseline
ISA level as needed.

bfd/

PR gas/26703
* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Generate
GNU_PROPERTY_X86_ISA_1_BASELINE for -z x86-64-baseline.

binutils/

PR gas/26703
* readelf.c (decode_x86_isa): Handle
* GNU_PROPERTY_X86_ISA_1_BASELINE.
* testsuite/binutils-all/i386/empty.d: Updated.
* testsuite/binutils-all/i386/ibt.d: Likewise.
* testsuite/binutils-all/i386/pr21231a.d: Likewise.
* testsuite/binutils-all/i386/pr21231b.d: Likewise.
* testsuite/binutils-all/i386/shstk.d: Likewise.
* testsuite/binutils-all/x86-64/empty-x32.d: Likewise.
* testsuite/binutils-all/x86-64/empty.d: Likewise.
* testsuite/binutils-all/x86-64/ibt-x32.d: Likewise.
* testsuite/binutils-all/x86-64/ibt.d: Likewise.
* testsuite/binutils-all/x86-64/pr21231a.d: Likewise.
* testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494a-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494e.d: Likewise.
* testsuite/binutils-all/x86-64/shstk-x32.d: Likewise.
* testsuite/binutils-all/x86-64/shstk.d: Likewise.

gas/

PR gas/26703
* config/tc-i386.c (output_insn): Update for
GNU_PROPERTY_X86_ISA_1_BASELINE.
* testsuite/gas/i386/property-1.d: Updated.
* testsuite/gas/i386/property-2.d: Likewise.
* testsuite/gas/i386/property-3.d: Likewise.
* testsuite/gas/i386/property-4.d: Likewise.
* testsuite/gas/i386/property-5.d: Likewise.
* testsuite/gas/i386/property-6.d: Likewise.
* testsuite/gas/i386/property-11.d: Likewise.
* testsuite/gas/i386/property-12.d: Likewise.
* testsuite/gas/i386/x86-64-property-1.d: Likewise.
* testsuite/gas/i386/x86-64-property-2.d: Likewise.
* testsuite/gas/i386/x86-64-property-3.d: Likewise.
* testsuite/gas/i386/x86-64-property-4.d: Likewise.
* testsuite/gas/i386/x86-64-property-5.d: Likewise.
* testsuite/gas/i386/x86-64-property-6.d: Likewise.
* testsuite/gas/i386/x86-64-property-11.d: Likewise.
* testsuite/gas/i386/x86-64-property-12.d: Likewise.

include/

PR gas/26703
* elf/common.h (GNU_PROPERTY_X86_ISA_1_BASELINE): New.
(GNU_PROPERTY_X86_ISA_1_V2): Uppdated.
(GNU_PROPERTY_X86_ISA_1_V3): Likewise.
(GNU_PROPERTY_X86_ISA_1_V4): Likewise.

ld/

PR gas/26703
* NEWS: Mention -z x86-64-baseline.
* ld.texi: Document -z x86-64-baseline.
* emulparams/x86-64-level.sh: Handle -z x86-64-baseline.
* testsuite/ld-elf/x86-feature-1a.rd: Update.
* testsuite/ld-elf/x86-feature-1b.rd: Likewise.
* testsuite/ld-elf/x86-feature-1c.rd: Likewise.
* testsuite/ld-elf/x86-feature-1d.rd: Likewise.
* testsuite/ld-elf/x86-feature-1e.rd: Likewise.
* testsuite/ld-i386/pr23372c.d: Likewise.
* testsuite/ld-i386/pr23486c.d: Likewise.
* testsuite/ld-i386/pr23486d.d: Likewise.
* testsuite/ld-i386/pr24322a.d: Likewise.
* testsuite/ld-i386/pr24322b.d: Likewise.
* testsuite/ld-i386/property-1a.r: Likewise.
* testsuite/ld-i386/property-2a.r: Likewise.
* testsuite/ld-i386/property-3.r: Likewise.
* testsuite/ld-i386/property-3a.r: Likewise.
* testsuite/ld-i386/property-4.r: Likewise.
* testsuite/ld-i386/property-4a.r: Likewise.
* testsuite/ld-i386/property-5.r: Likewise.
* testsuite/ld-i386/property-5a.r: Likewise.
* testsuite/ld-i386/property-7a.r: Likewise.
* testsuite/ld-i386/property-x86-3.d: Likewise.
* testsuite/ld-i386/property-x86-4a.d: Likewise.
* testsuite/ld-i386/property-x86-5.d: Likewise.
* testsuite/ld-i386/property-x86-cet1.d: Likewise.
* testsuite/ld-i386/property-x86-cet2a.d: Likewise.
* testsuite/ld-i386/property-x86-cet5a.d: Likewise.
* testsuite/ld-i386/property-x86-cet5b.d: Likewise.
* testsuite/ld-i386/property-x86-ibt1a.d: Likewise.
* testsuite/ld-i386/property-x86-ibt1b.d: Likewise.
* testsuite/ld-i386/property-x86-ibt2.d: Likewise.
* testsuite/ld-i386/property-x86-ibt3a.d: Likewise.
* testsuite/ld-i386/property-x86-ibt3b.d: Likewise.
* testsuite/ld-i386/property-x86-ibt4.d: Likewise.
* testsuite/ld-i386/property-x86-ibt5.d: Likewise.
* testsuite/ld-i386/property-x86-isa1.d: Likewise.
* testsuite/ld-i386/property-x86-isa2.d: Likewise.
* testsuite/ld-i386/property-x86-isa3.d: Likewise.
* testsuite/ld-i386/property-x86-shstk1a.d: Likewise.
* testsuite/ld-i386/property-x86-shstk1b.d: Likewise.
* testsuite/ld-i386/property-x86-shstk2.d: Likewise.
* testsuite/ld-i386/property-x86-shstk3a.d: Likewise.
* testsuite/ld-i386/property-x86-shstk3b.d: Likewise.
* testsuite/ld-i386/property-x86-shstk4.d: Likewise.
* testsuite/ld-i386/property-x86-shstk5.d: Likewise.
* testsuite/ld-x86-64/pr23372c-x32.d: Likewise.
* testsuite/ld-x86-64/pr23372c.d: Likewise.
* testsuite/ld-x86-64/pr23486c-x32.d: Likewise.
* testsuite/ld-x86-64/pr23486c.d: Likewise.
* testsuite/ld-x86-64/pr23486d-x32.d: Likewise.
* testsuite/ld-x86-64/pr23486d.d: Likewise.
* testsuite/ld-x86-64/pr24322a-x32.d: Likewise.
* testsuite/ld-x86-64/pr24322a.d: Likewise.
* testsuite/ld-x86-64/pr24322b-x32.d: Likewise.
* testsuite/ld-x86-64/pr24322b.d: Likewise.
* testsuite/ld-x86-64/pr24458a-x32.d: Likewise.
* testsuite/ld-x86-64/pr24458a.d: Likewise.
* testsuite/ld-x86-64/pr24458b-x32.d: Likewise.
* testsuite/ld-x86-64/pr24458b.d: Likewise.
* testsuite/ld-x86-64/pr24458c-x32.d: Likewise.
* testsuite/ld-x86-64/pr24458c.d: Likewise.
* testsuite/ld-x86-64/property-1a.r: Likewise.
* testsuite/ld-x86-64/property-2a.r: Likewise.
* testsuite/ld-x86-64/property-3.r: Likewise.
* testsuite/ld-x86-64/property-3a.r: Likewise.
* testsuite/ld-x86-64/property-4.r: Likewise.
* testsuite/ld-x86-64/property-4a.r: Likewise.
* testsuite/ld-x86-64/property-5.r: Likewise.
* testsuite/ld-x86-64/property-5a.r: Likewise.
* testsuite/ld-x86-64/property-7a.r: Likewise.
* testsuite/ld-x86-64/property-x86-3-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-3.d: Likewise.
* testsuite/ld-x86-64/property-x86-4a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-4a.d: Likewise.
* testsuite/ld-x86-64/property-x86-5-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-5.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet1-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet1.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet2a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet2a.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet5a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet5a.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet5b-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-cet5b.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt1a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt1a.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt1b-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt1b.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt2-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt2.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt4-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt4.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt5-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa1-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa1.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa2-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa2.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa3-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa3.d: Likewise.
* testsuite/ld-x86-64/property-x86-ibt5.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk1a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk1a.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk1b-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk1b.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk2-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk2.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk4-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk4.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk5-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-shstk5.d: Likewise.
* testsuite/ld-i386/i386.exp: Run property-x86-isa4.
* testsuite/ld-i386/property-x86-isa4.d: New file.
* testsuite/ld-x86-64/property-x86-isa4-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-isa4.d: Likewise.
* ld/testsuite/ld-x86-64/x86-64.exp: Run property-x86-isa4
and property-x86-isa4-x32.
162 files changed:
bfd/ChangeLog
bfd/elfxx-x86.c
binutils/ChangeLog
binutils/readelf.c
binutils/testsuite/binutils-all/i386/empty.d
binutils/testsuite/binutils-all/i386/ibt.d
binutils/testsuite/binutils-all/i386/pr21231a.d
binutils/testsuite/binutils-all/i386/pr21231b.d
binutils/testsuite/binutils-all/i386/shstk.d
binutils/testsuite/binutils-all/x86-64/empty-x32.d
binutils/testsuite/binutils-all/x86-64/empty.d
binutils/testsuite/binutils-all/x86-64/ibt-x32.d
binutils/testsuite/binutils-all/x86-64/ibt.d
binutils/testsuite/binutils-all/x86-64/pr21231a.d
binutils/testsuite/binutils-all/x86-64/pr21231b.d
binutils/testsuite/binutils-all/x86-64/pr23494a-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494a.d
binutils/testsuite/binutils-all/x86-64/pr23494c-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494c.d
binutils/testsuite/binutils-all/x86-64/pr23494d-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494d.d
binutils/testsuite/binutils-all/x86-64/pr23494e-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494e.d
binutils/testsuite/binutils-all/x86-64/shstk-x32.d
binutils/testsuite/binutils-all/x86-64/shstk.d
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/property-1.d
gas/testsuite/gas/i386/property-11.d
gas/testsuite/gas/i386/property-12.d
gas/testsuite/gas/i386/property-3.d
gas/testsuite/gas/i386/property-4.d
gas/testsuite/gas/i386/property-5.d
gas/testsuite/gas/i386/property-6.d
gas/testsuite/gas/i386/x86-64-property-1.d
gas/testsuite/gas/i386/x86-64-property-11.d
gas/testsuite/gas/i386/x86-64-property-12.d
gas/testsuite/gas/i386/x86-64-property-3.d
gas/testsuite/gas/i386/x86-64-property-4.d
gas/testsuite/gas/i386/x86-64-property-5.d
gas/testsuite/gas/i386/x86-64-property-6.d
include/ChangeLog
include/elf/common.h
ld/ChangeLog
ld/NEWS
ld/emulparams/x86-64-level.sh
ld/ld.texi
ld/testsuite/ld-elf/x86-feature-1a.rd
ld/testsuite/ld-elf/x86-feature-1b.rd
ld/testsuite/ld-elf/x86-feature-1c.rd
ld/testsuite/ld-elf/x86-feature-1d.rd
ld/testsuite/ld-elf/x86-feature-1e.rd
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/pr23372c.d
ld/testsuite/ld-i386/pr23486c.d
ld/testsuite/ld-i386/pr23486d.d
ld/testsuite/ld-i386/pr24322a.d
ld/testsuite/ld-i386/pr24322b.d
ld/testsuite/ld-i386/property-1a.r
ld/testsuite/ld-i386/property-2a.r
ld/testsuite/ld-i386/property-3.r
ld/testsuite/ld-i386/property-3a.r
ld/testsuite/ld-i386/property-4.r
ld/testsuite/ld-i386/property-4a.r
ld/testsuite/ld-i386/property-5.r
ld/testsuite/ld-i386/property-5a.r
ld/testsuite/ld-i386/property-7a.r
ld/testsuite/ld-i386/property-x86-3.d
ld/testsuite/ld-i386/property-x86-4a.d
ld/testsuite/ld-i386/property-x86-5.d
ld/testsuite/ld-i386/property-x86-cet1.d
ld/testsuite/ld-i386/property-x86-cet2a.d
ld/testsuite/ld-i386/property-x86-cet5a.d
ld/testsuite/ld-i386/property-x86-cet5b.d
ld/testsuite/ld-i386/property-x86-ibt1a.d
ld/testsuite/ld-i386/property-x86-ibt1b.d
ld/testsuite/ld-i386/property-x86-ibt2.d
ld/testsuite/ld-i386/property-x86-ibt3a.d
ld/testsuite/ld-i386/property-x86-ibt3b.d
ld/testsuite/ld-i386/property-x86-ibt4.d
ld/testsuite/ld-i386/property-x86-ibt5.d
ld/testsuite/ld-i386/property-x86-isa1.d
ld/testsuite/ld-i386/property-x86-isa4.d [new file with mode: 0644]
ld/testsuite/ld-i386/property-x86-shstk1a.d
ld/testsuite/ld-i386/property-x86-shstk1b.d
ld/testsuite/ld-i386/property-x86-shstk2.d
ld/testsuite/ld-i386/property-x86-shstk3a.d
ld/testsuite/ld-i386/property-x86-shstk3b.d
ld/testsuite/ld-i386/property-x86-shstk4.d
ld/testsuite/ld-i386/property-x86-shstk5.d
ld/testsuite/ld-x86-64/pr23372c-x32.d
ld/testsuite/ld-x86-64/pr23372c.d
ld/testsuite/ld-x86-64/pr23486c-x32.d
ld/testsuite/ld-x86-64/pr23486c.d
ld/testsuite/ld-x86-64/pr23486d-x32.d
ld/testsuite/ld-x86-64/pr23486d.d
ld/testsuite/ld-x86-64/pr24322a-x32.d
ld/testsuite/ld-x86-64/pr24322a.d
ld/testsuite/ld-x86-64/pr24322b-x32.d
ld/testsuite/ld-x86-64/pr24322b.d
ld/testsuite/ld-x86-64/pr24458a-x32.d
ld/testsuite/ld-x86-64/pr24458a.d
ld/testsuite/ld-x86-64/pr24458b-x32.d
ld/testsuite/ld-x86-64/pr24458b.d
ld/testsuite/ld-x86-64/pr24458c-x32.d
ld/testsuite/ld-x86-64/pr24458c.d
ld/testsuite/ld-x86-64/property-1a.r
ld/testsuite/ld-x86-64/property-2a.r
ld/testsuite/ld-x86-64/property-3.r
ld/testsuite/ld-x86-64/property-3a.r
ld/testsuite/ld-x86-64/property-4.r
ld/testsuite/ld-x86-64/property-4a.r
ld/testsuite/ld-x86-64/property-5.r
ld/testsuite/ld-x86-64/property-5a.r
ld/testsuite/ld-x86-64/property-7a.r
ld/testsuite/ld-x86-64/property-x86-3-x32.d
ld/testsuite/ld-x86-64/property-x86-3.d
ld/testsuite/ld-x86-64/property-x86-4a-x32.d
ld/testsuite/ld-x86-64/property-x86-4a.d
ld/testsuite/ld-x86-64/property-x86-5-x32.d
ld/testsuite/ld-x86-64/property-x86-5.d
ld/testsuite/ld-x86-64/property-x86-cet1-x32.d
ld/testsuite/ld-x86-64/property-x86-cet1.d
ld/testsuite/ld-x86-64/property-x86-cet2a-x32.d
ld/testsuite/ld-x86-64/property-x86-cet2a.d
ld/testsuite/ld-x86-64/property-x86-cet5a-x32.d
ld/testsuite/ld-x86-64/property-x86-cet5a.d
ld/testsuite/ld-x86-64/property-x86-cet5b-x32.d
ld/testsuite/ld-x86-64/property-x86-cet5b.d
ld/testsuite/ld-x86-64/property-x86-ibt1a-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt1a.d
ld/testsuite/ld-x86-64/property-x86-ibt1b-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt1b.d
ld/testsuite/ld-x86-64/property-x86-ibt2-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt2.d
ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt3a.d
ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt3b.d
ld/testsuite/ld-x86-64/property-x86-ibt4-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt4.d
ld/testsuite/ld-x86-64/property-x86-ibt5-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt5.d
ld/testsuite/ld-x86-64/property-x86-isa1-x32.d
ld/testsuite/ld-x86-64/property-x86-isa1.d
ld/testsuite/ld-x86-64/property-x86-isa4-x32.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-isa4.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-x86-shstk1a-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk1a.d
ld/testsuite/ld-x86-64/property-x86-shstk1b-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk1b.d
ld/testsuite/ld-x86-64/property-x86-shstk2-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk2.d
ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk3a.d
ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk3b.d
ld/testsuite/ld-x86-64/property-x86-shstk4-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk4.d
ld/testsuite/ld-x86-64/property-x86-shstk5-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk5.d
ld/testsuite/ld-x86-64/x86-64.exp