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-i386 | |
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-i386')
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbin.dd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbinpic.s | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsg.s | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsg.sd | 10 |
5 files changed, 29 insertions, 4 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 15821eb..795efc2 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -52,6 +52,9 @@ set i386tests { "--32" {tlsnopic1.s tlsnopic2.s} {{readelf -Ssrl tlsnopic.rd} {objdump -drj.text tlsnopic.dd} {objdump -sj.got tlsnopic.sd}} "libtlsnopic.so"} + {"TLS in debug sections" "-melf_i386" + "--32" {tlsg.s} + {{objdump -sj.debug_foobar tlsg.sd}} "tlsg"} {"Reloc section order" "-shared -melf_i386" "--32" {reloc.s} {{objdump -hw reloc.d}} "reloc.so"} } diff --git a/ld/testsuite/ld-i386/tlsbin.dd b/ld/testsuite/ld-i386/tlsbin.dd index 9ad0cc3..83c3409 100644 --- a/ld/testsuite/ld-i386/tlsbin.dd +++ b/ld/testsuite/ld-i386/tlsbin.dd @@ -89,7 +89,7 @@ Disassembly of section .text: 8049082: 90[ ]+nop * 8049083: 90[ ]+nop * 8049084: 90[ ]+nop * -# LD +# LD -> LE 8049085: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax 804908b: 90[ ]+nop * 804908c: 8d 74 26 00[ ]+lea 0x0\(%esi,1\),%esi @@ -105,7 +105,7 @@ Disassembly of section .text: 80490a1: 90[ ]+nop * 80490a2: 90[ ]+nop * 80490a3: 90[ ]+nop * -# LD against hidden variables +# LD -> LE against hidden variables 80490a4: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax 80490aa: 90[ ]+nop * 80490ab: 8d 74 26 00[ ]+lea 0x0\(%esi,1\),%esi diff --git a/ld/testsuite/ld-i386/tlsbinpic.s b/ld/testsuite/ld-i386/tlsbinpic.s index 027773a..c6b6efa 100644 --- a/ld/testsuite/ld-i386/tlsbinpic.s +++ b/ld/testsuite/ld-i386/tlsbinpic.s @@ -83,7 +83,7 @@ fn2: call ___tls_get_addr@plt nop;nop;nop;nop - /* LD */ + /* LD -> LE */ leal sl1@tlsldm(%ebx), %eax call ___tls_get_addr@PLT nop;nop @@ -92,7 +92,7 @@ fn2: leal sl2@dtpoff(%eax), %ecx nop;nop;nop;nop - /* LD against hidden variables */ + /* LD -> LE against hidden variables */ leal sh1@tlsldm(%ebx), %eax call ___tls_get_addr@PLT nop;nop diff --git a/ld/testsuite/ld-i386/tlsg.s b/ld/testsuite/ld-i386/tlsg.s new file mode 100644 index 0000000..b8e1a5d --- /dev/null +++ b/ld/testsuite/ld-i386/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 diff --git a/ld/testsuite/ld-i386/tlsg.sd b/ld/testsuite/ld-i386/tlsg.sd new file mode 100644 index 0000000..d794762 --- /dev/null +++ b/ld/testsuite/ld-i386/tlsg.sd @@ -0,0 +1,10 @@ +#source: tlsg.s +#as: --32 +#ld: -melf_i386 +#objdump: -sj.debug_foobar +#target: i?86-*-* + +.*: +file format elf32-i386 + +Contents of section .debug_foobar: + 0+ 18000000 +.* |