diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-10-01 09:10:46 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2002-10-01 09:10:46 +0000 |
commit | a45bb67df201470589b4adc8b50190bdbec903cb (patch) | |
tree | 48ee43725910b197400b5ec6fc0cfd60ae20b95a /ld/testsuite/ld-x86-64 | |
parent | 97724570fe57a08d93c7c61269848e2326cf4efc (diff) | |
download | gdb-a45bb67df201470589b4adc8b50190bdbec903cb.zip gdb-a45bb67df201470589b4adc8b50190bdbec903cb.tar.gz gdb-a45bb67df201470589b4adc8b50190bdbec903cb.tar.bz2 |
bfd/
* elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
to st_value + addend in non-code sections.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
ld/testsuite/
* ld-i386/i386.exp: Add tlsg test.
* ld-i386/tlsg.s: New test.
* ld-i386/tlsg.sd: New test.
* ld-i386/tlsbin.dd: Change LD into LD -> LE in comments.
* ld-i386/tlsbinpic.s: Likewise.
* ld-x86-64/x86-64.exp: Add tlsg test.
* ld-x86-64/tlsg.s: New test.
* ld-x86-64/tlsg.sd: New test.
* ld-x86-64/tlsbin.dd: Change LD into LD -> LE in comments.
* ld-x86-64/tlsbinpic.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64')
-rw-r--r-- | ld/testsuite/ld-x86-64/tlsbin.dd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/tlsbinpic.s | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/tlsg.s | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/tlsg.sd | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 3 |
5 files changed, 29 insertions, 4 deletions
diff --git a/ld/testsuite/ld-x86-64/tlsbin.dd b/ld/testsuite/ld-x86-64/tlsbin.dd index 288b2cd..c6aef68 100644 --- a/ld/testsuite/ld-x86-64/tlsbin.dd +++ b/ld/testsuite/ld-x86-64/tlsbin.dd @@ -67,7 +67,7 @@ Disassembly of section .text: 401065: 90[ ]+nop * 401066: 90[ ]+nop * 401067: 90[ ]+nop * -# LD +# LD -> LE 401068: 66 66 66 64 48 8b 04[ ]+mov %fs:0x0,%rax 40106f: 25 00 00 00 00 * 401074: 90[ ]+nop * @@ -82,7 +82,7 @@ Disassembly of section .text: 401087: 90[ ]+nop * 401088: 90[ ]+nop * 401089: 90[ ]+nop * -# LD against hidden variables +# LD -> LE against hidden variables 40108a: 66 66 66 64 48 8b 04[ ]+mov %fs:0x0,%rax 401091: 25 00 00 00 00 * 401096: 90[ ]+nop * diff --git a/ld/testsuite/ld-x86-64/tlsbinpic.s b/ld/testsuite/ld-x86-64/tlsbinpic.s index da6085f..0f5765a 100644 --- a/ld/testsuite/ld-x86-64/tlsbinpic.s +++ b/ld/testsuite/ld-x86-64/tlsbinpic.s @@ -70,7 +70,7 @@ fn2: call __tls_get_addr@plt nop;nop;nop;nop - /* LD */ + /* LD -> LE */ leaq sl1@tlsld(%rip), %rdi call __tls_get_addr@plt nop;nop @@ -79,7 +79,7 @@ fn2: leaq sl2@dtpoff+2(%rax), %r9 nop;nop;nop;nop - /* LD against hidden variables */ + /* LD -> LE against hidden variables */ leaq sh1@tlsld(%rip), %rdi call __tls_get_addr@plt nop;nop diff --git a/ld/testsuite/ld-x86-64/tlsg.s b/ld/testsuite/ld-x86-64/tlsg.s new file mode 100644 index 0000000..048e98f --- /dev/null +++ b/ld/testsuite/ld-x86-64/tlsg.s @@ -0,0 +1,12 @@ + .section .tbss,"awT",@nobits + .align 4 + .skip 24 + .type a,@object + .size a,4 +a: + .zero 4 + .text + .globl _start +_start: + .section .debug_foobar + .long a@dtpoff, 0 diff --git a/ld/testsuite/ld-x86-64/tlsg.sd b/ld/testsuite/ld-x86-64/tlsg.sd new file mode 100644 index 0000000..4eaf3cd --- /dev/null +++ b/ld/testsuite/ld-x86-64/tlsg.sd @@ -0,0 +1,10 @@ +#source: tlsg.s +#as: --64 +#ld: -melf_x86_64 +#objdump: -sj.debug_foobar +#target: x86_64-*-* + +.*: +file format elf64-x86-64 + +Contents of section .debug_foobar: + 0+ 18000000 0+ +.* diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index edfae9a..1bbae43 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -46,6 +46,9 @@ set x86_64tests { {{readelf -WSsrl tlsbin.rd} {objdump -drj.text tlsbin.dd} {objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}} "tlsbin"} + {"TLS in debug sections" "-melf_x86_64" + "--64" {tlsg.s} + {{objdump -sj.debug_foobar tlsg.sd}} "tlsg"} } run_ld_link_tests $x86_64tests |