From 4bb3c591b258d12dd0f743e538b7214cbb92ebf7 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 31 Aug 2018 05:11:03 -0700 Subject: [PATCH] ld: Pass -z separate-code to ld for property-x86-4a tests Pass -z separate-code to ld for property-x86-4a tests to generate the expected .note.gnu.property section. Also run i386 tests for x86_64-*-elf* targets. * testsuite/ld-i386/i386.exp: Also run for x86_64-*-elf* targets. * testsuite/ld-i386/property-x86-4a.d: Pass -z separate-code to ld. * testsuite/ld-x86-64/property-x86-4a-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-4a.d: Likewise. --- ld/ChangeLog | 8 ++++++++ ld/testsuite/ld-i386/i386.exp | 1 + ld/testsuite/ld-i386/property-x86-4a.d | 2 +- ld/testsuite/ld-x86-64/property-x86-4a-x32.d | 2 +- ld/testsuite/ld-x86-64/property-x86-4a.d | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 2d1e900..6d929c7 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,13 @@ 2018-08-31 H.J. Lu + * testsuite/ld-i386/i386.exp: Also run for x86_64-*-elf* targets. + * testsuite/ld-i386/property-x86-4a.d: Pass -z separate-code to + ld. + * testsuite/ld-x86-64/property-x86-4a-x32.d: Likewise. + * testsuite/ld-x86-64/property-x86-4a.d: Likewise. + +2018-08-31 H.J. Lu + * testsuite/ld-elf/elf.exp (ASFLAGS): Save, append -mx86-used-note=no and restore. * testsuite/ld-ifunc/ifunc.exp (ASFLAGS): Likewise. diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 703c327..21f5593 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -109,6 +109,7 @@ if { !([istarget "i?86-*-elf*"] || [istarget "i?86-*-linux*"] || [istarget "i?86-*-gnu*"] || [istarget "i?86-*-nacl*"] + || [istarget "x86_64-*-elf*"] || [istarget "x86_64-*-nacl*"] || [istarget "x86_64-*-linux*"] || [istarget "amd64-*-linux*"]) } { diff --git a/ld/testsuite/ld-i386/property-x86-4a.d b/ld/testsuite/ld-i386/property-x86-4a.d index 6d94b73..8ab0115 100644 --- a/ld/testsuite/ld-i386/property-x86-4a.d +++ b/ld/testsuite/ld-i386/property-x86-4a.d @@ -1,7 +1,7 @@ #source: property-x86-4a.s #source: property-x86-4b.s #as: --32 -mx86-used-note=yes -#ld: -m elf_i386 --gc-sections --entry=main +#ld: -m elf_i386 --gc-sections --entry=main -z separate-code #readelf: -n Displaying notes found in: .note.gnu.property diff --git a/ld/testsuite/ld-x86-64/property-x86-4a-x32.d b/ld/testsuite/ld-x86-64/property-x86-4a-x32.d index 7c6a2e1..9dd6e35 100644 --- a/ld/testsuite/ld-x86-64/property-x86-4a-x32.d +++ b/ld/testsuite/ld-x86-64/property-x86-4a-x32.d @@ -1,7 +1,7 @@ #source: property-x86-4a.s #source: property-x86-4b.s #as: --x32 -mx86-used-note=yes -#ld: -m elf32_x86_64 --gc-sections --entry=main +#ld: -m elf32_x86_64 --gc-sections --entry=main -z separate-code #readelf: -n Displaying notes found in: .note.gnu.property diff --git a/ld/testsuite/ld-x86-64/property-x86-4a.d b/ld/testsuite/ld-x86-64/property-x86-4a.d index 8637ed4..4dc87ac 100644 --- a/ld/testsuite/ld-x86-64/property-x86-4a.d +++ b/ld/testsuite/ld-x86-64/property-x86-4a.d @@ -1,7 +1,7 @@ #source: property-x86-4a.s #source: property-x86-4b.s #as: --64 -defsym __64_bit__=1 -mx86-used-note=yes -#ld: -m elf_x86_64 --gc-sections --entry=main +#ld: -m elf_x86_64 --gc-sections --entry=main -z separate-code #readelf: -n Displaying notes found in: .note.gnu.property -- 2.7.4