Browse Source
* 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.drow-cplus-branch
14 changed files with 80 additions and 10 deletions
@ -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,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 +.* |
|||
@ -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 |
|||
@ -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+ +.* |
|||
Loading…
Reference in new issue