diff options
author | Sam James <sam@gentoo.org> | 2023-07-28 16:20:34 +0100 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2023-07-30 17:08:12 +0200 |
commit | 20c8173cfd78714039395eb635b2b37347efd4bb (patch) | |
tree | e106329f1fd6e59b62b035bc7077015d7f6675dc | |
parent | Apply a similar libiberty fix as in 7d53105d for libopcodes and libgprofng (diff) | |
download | binutils-gdb-20c8173cfd78714039395eb635b2b37347efd4bb.tar.gz binutils-gdb-20c8173cfd78714039395eb635b2b37347efd4bb.tar.bz2 binutils-gdb-20c8173cfd78714039395eb635b2b37347efd4bb.zip |
ld: Fix test failures with --enable-textrel-check=errorgentoo/binutils-2.41-1
Tested with the following:
* --enable-textrel-check=error
* --enable-warn-execstack=yes
* --enable-warn-rwx-segments=yes
* --enable-default-execstack=no
in preparation for hopefully toggling these in Gentoo Hardened
at least.
This is similar in nature to 0ab7005043ee404dabfd690952efc25c399995ae
and 340640f710e690b37c885166949595cde5f827b2.
This fixes the following test failures:
* FAIL: ld-x86-64/pr18801a
* FAIL: ld-x86-64/pr18801b
* FAIL: ld-x86-64/ifunc-textrel-1a
* FAIL: ld-x86-64/ifunc-textrel-1b
* FAIL: ld-i386/pr18801a
* FAIL: ld-i386/pr18801b
* FAIL: ld-i386/ifunc-textrel-1a
* FAIL: ld-i386/ifunc-textrel-1b
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | ld/testsuite/ld-i386/ifunc-textrel-1a.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/ifunc-textrel-1b.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr18801a.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr18801b.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/ifunc-textrel-1a.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/ifunc-textrel-1b.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr18801a.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr18801b.d | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/ld/testsuite/ld-i386/ifunc-textrel-1a.d b/ld/testsuite/ld-i386/ifunc-textrel-1a.d index 15f545db03d..aad77e7d230 100644 --- a/ld/testsuite/ld-i386/ifunc-textrel-1a.d +++ b/ld/testsuite/ld-i386/ifunc-textrel-1a.d @@ -1,4 +1,4 @@ #source: ../ld-x86-64/ifunc-textrel-1.s #as: --32 -#ld: -m elf_i386 -pie +#ld: -m elf_i386 -pie -z notext #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIE diff --git a/ld/testsuite/ld-i386/ifunc-textrel-1b.d b/ld/testsuite/ld-i386/ifunc-textrel-1b.d index 6e4a67c48f0..bf0f2ac5df9 100644 --- a/ld/testsuite/ld-i386/ifunc-textrel-1b.d +++ b/ld/testsuite/ld-i386/ifunc-textrel-1b.d @@ -1,4 +1,4 @@ #source: ../ld-x86-64/ifunc-textrel-1.s #as: --32 -#ld: -m elf_i386 -shared +#ld: -m elf_i386 -shared -z notext #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIC diff --git a/ld/testsuite/ld-i386/pr18801a.d b/ld/testsuite/ld-i386/pr18801a.d index 73cb5d17beb..b1ef145a882 100644 --- a/ld/testsuite/ld-i386/pr18801a.d +++ b/ld/testsuite/ld-i386/pr18801a.d @@ -1,4 +1,4 @@ #source: pr18801.s #as: --32 -#ld: -m elf_i386 -pie +#ld: -m elf_i386 -pie -z notext #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIE diff --git a/ld/testsuite/ld-i386/pr18801b.d b/ld/testsuite/ld-i386/pr18801b.d index 0bf7fb729cb..983346ca248 100644 --- a/ld/testsuite/ld-i386/pr18801b.d +++ b/ld/testsuite/ld-i386/pr18801b.d @@ -1,4 +1,4 @@ #source: pr18801.s #as: --32 -#ld: -m elf_i386 -shared +#ld: -m elf_i386 -shared -z notext #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIC diff --git a/ld/testsuite/ld-x86-64/ifunc-textrel-1a.d b/ld/testsuite/ld-x86-64/ifunc-textrel-1a.d index 64a1e7021fd..667366091b9 100644 --- a/ld/testsuite/ld-x86-64/ifunc-textrel-1a.d +++ b/ld/testsuite/ld-x86-64/ifunc-textrel-1a.d @@ -1,4 +1,4 @@ #source: ifunc-textrel-1.s #as: --64 -defsym __x86_64__=1 -#ld: -m elf_x86_64 -pie +#ld: -m elf_x86_64 -pie -z notext #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIE diff --git a/ld/testsuite/ld-x86-64/ifunc-textrel-1b.d b/ld/testsuite/ld-x86-64/ifunc-textrel-1b.d index aeb31fdb3dc..f7b8e02a72c 100644 --- a/ld/testsuite/ld-x86-64/ifunc-textrel-1b.d +++ b/ld/testsuite/ld-x86-64/ifunc-textrel-1b.d @@ -1,4 +1,4 @@ #source: ifunc-textrel-1.s #as: --64 -defsym __x86_64__=1 -#ld: -m elf_x86_64 -shared +#ld: -m elf_x86_64 -shared -z notext #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIC diff --git a/ld/testsuite/ld-x86-64/pr18801a.d b/ld/testsuite/ld-x86-64/pr18801a.d index 2b4159d3044..61f9d991185 100644 --- a/ld/testsuite/ld-x86-64/pr18801a.d +++ b/ld/testsuite/ld-x86-64/pr18801a.d @@ -1,4 +1,4 @@ #source: pr18801.s #as: --64 -#ld: -melf_x86_64 -pie +#ld: -melf_x86_64 -pie -z notext #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIE diff --git a/ld/testsuite/ld-x86-64/pr18801b.d b/ld/testsuite/ld-x86-64/pr18801b.d index 34dab1aa6cb..967a339f90b 100644 --- a/ld/testsuite/ld-x86-64/pr18801b.d +++ b/ld/testsuite/ld-x86-64/pr18801b.d @@ -1,4 +1,4 @@ #source: pr18801.s #as: --64 -#ld: -melf_x86_64 -shared +#ld: -melf_x86_64 -shared -z notext #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIC |