diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2022-11-22 13:58:47 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-11-22 14:03:16 -0800 |
commit | 04ad71937f28561ad5a2bbbc7e8f0af21e1019f8 (patch) | |
tree | 2d978f2db649db8a7f5fa0d919ea220d68da8c40 /ld | |
parent | 26c527e62e701ae256c1af243ec9d73e5560bd48 (diff) | |
download | gdb-04ad71937f28561ad5a2bbbc7e8f0af21e1019f8.zip gdb-04ad71937f28561ad5a2bbbc7e8f0af21e1019f8.tar.gz gdb-04ad71937f28561ad5a2bbbc7e8f0af21e1019f8.tar.bz2 |
x86: Don't define _TLS_MODULE_BASE_ for ld -r
bfd/
PR ld/29820
* elfxx-x86.c (_bfd_x86_elf_always_size_sections): Don't define
_TLS_MODULE_BASE_ for ld -r.
ld/
PR ld/29820
* testsuite/ld-x86-64/pr29820.d: New file.
* testsuite/ld-x86-64/pr29820.s: Likewise.
* testsuite/ld-x86-64/x86-64.ex: Run pr29820.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ld-x86-64/pr29820.d | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr29820.s | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/pr29820.d b/ld/testsuite/ld-x86-64/pr29820.d new file mode 100644 index 0000000..8dc5d61 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr29820.d @@ -0,0 +1,6 @@ +#ld: -r +#readelf: -s -W + +#... + +[0-9]+: +0+ +0 +TLS +GLOBAL +DEFAULT +UND +_TLS_MODULE_BASE_ +#pass diff --git a/ld/testsuite/ld-x86-64/pr29820.s b/ld/testsuite/ld-x86-64/pr29820.s new file mode 100644 index 0000000..7a4815f --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr29820.s @@ -0,0 +1,12 @@ + .text + leaq _TLS_MODULE_BASE_@tlsdesc(%rip), %rax + call *_TLS_MODULE_BASE_@tlscall(%rax) + movl %fs:a@dtpoff(%rax), %edx + addl %fs:b@dtpoff(%rax), %edx + + .section .tbss + .zero 8 +a: + .zero 4 +b: + .zero 4 diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index 1782e8e..136371b 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -728,6 +728,7 @@ run_dump_test "pr27016a" run_dump_test "pr27016b" run_dump_test "report-reloc-1" run_dump_test "report-reloc-1-x32" +run_dump_test "pr29820" proc undefined_weak {cflags ldflags} { set testname "Undefined weak symbol" |