diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2022-02-15 15:03:02 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-02-15 15:08:17 -0800 |
commit | 3319ba7a8d6a42ba071d691789bc184632399331 (patch) | |
tree | 6f1ab6e535eb95bd307ff7d918cc981f342350bd /ld | |
parent | e63f65fea9e87ba2d4daa78fb4c82c631c103f02 (diff) | |
download | gdb-3319ba7a8d6a42ba071d691789bc184632399331.zip gdb-3319ba7a8d6a42ba071d691789bc184632399331.tar.gz gdb-3319ba7a8d6a42ba071d691789bc184632399331.tar.bz2 |
i386: Update I386_NEED_DYNAMIC_RELOC_TYPE_P for DT_TEXTREL
Update I386_NEED_DYNAMIC_RELOC_TYPE_P to allow R_386_TLS_IE for relocation
in read-only section.
bfd/
PR ld/28894
* elfxx-x86.h (I386_NEED_DYNAMIC_RELOC_TYPE_P): Allow
R_386_TLS_IE.
ld/
PR ld/28894
* testsuite/ld-i386/i386.exp: Run pr28894.
* testsuite/ld-i386/pr28894.d: New file.
* testsuite/ld-i386/pr28894.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr28894.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr28894.s | 7 |
3 files changed, 11 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index d997c75..fadbd16 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -510,6 +510,7 @@ run_dump_test "pr27491-4" run_dump_test "dt-relr-1a" run_dump_test "dt-relr-1b" run_dump_test "pr28870" +run_dump_test "pr28894" if { !([istarget "i?86-*-linux*"] || [istarget "i?86-*-gnu*"] diff --git a/ld/testsuite/ld-i386/pr28894.d b/ld/testsuite/ld-i386/pr28894.d new file mode 100644 index 0000000..a8d1111 --- /dev/null +++ b/ld/testsuite/ld-i386/pr28894.d @@ -0,0 +1,3 @@ +#as: --32 +#ld: -shared -melf_i386 --warn-shared-textrel --fatal-warnings +#error: .*warning: creating DT_TEXTREL in a shared object diff --git a/ld/testsuite/ld-i386/pr28894.s b/ld/testsuite/ld-i386/pr28894.s new file mode 100644 index 0000000..1d3e3f3 --- /dev/null +++ b/ld/testsuite/ld-i386/pr28894.s @@ -0,0 +1,7 @@ + .text + addl foo@INDNTPOFF, %eax + .section .tbss,"awT",@nobits + .globl foo + .hidden foo +foo: + .byte 0 |