Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lld/test/ELF/i386-zrel-zrela.s
Show All 21 Lines | |||||
# REL-NEXT: R_386_TLS_TPOFF tls | # REL-NEXT: R_386_TLS_TPOFF tls | ||||
# REL-NEXT: R_386_32 _start | # REL-NEXT: R_386_32 _start | ||||
# REL-NEXT: } | # REL-NEXT: } | ||||
# REL-NEXT: .rel.plt { | # REL-NEXT: .rel.plt { | ||||
# REL-NEXT: R_386_JUMP_SLOT func | # REL-NEXT: R_386_JUMP_SLOT func | ||||
# REL-NEXT: } | # REL-NEXT: } | ||||
# REL: Hex dump of section '.data': | # REL: Hex dump of section '.data': | ||||
# REL-NEXT: 0x000042cc cc420000 2a000000 | # REL-NEXT: 0x000042d0 d0420000 2a000000 | ||||
# RUN: ld.lld -shared -z rel -z rela %t.o -o %t2.so | # RUN: ld.lld -shared -z rel -z rela %t.o -o %t2.so | ||||
# RUN: llvm-readobj -d -r %t2.so | FileCheck --check-prefix=RELA %s | # RUN: llvm-readobj -d -r %t2.so | FileCheck --check-prefix=RELA %s | ||||
# RELA: RELA {{.*}} | # RELA: RELA {{.*}} | ||||
# RELA-NEXT: RELASZ 48 (bytes) | # RELA-NEXT: RELASZ 48 (bytes) | ||||
# RELA-NEXT: RELAENT 12 (bytes) | # RELA-NEXT: RELAENT 12 (bytes) | ||||
# RELA-NEXT: RELACOUNT 1 | # RELA-NEXT: RELACOUNT 1 | ||||
# RELA-NEXT: JMPREL {{.*}} | # RELA-NEXT: JMPREL {{.*}} | ||||
# RELA-NEXT: PLTRELSZ 12 (bytes) | # RELA-NEXT: PLTRELSZ 12 (bytes) | ||||
# RELA-NEXT: PLTGOT {{.*}} | # RELA-NEXT: PLTGOT {{.*}} | ||||
# RELA-NEXT: PLTREL RELA | # RELA-NEXT: PLTREL RELA | ||||
# RELA: .rela.dyn { | # RELA: .rela.dyn { | ||||
# RELA-NEXT: R_386_RELATIVE - 0x42EC | # RELA-NEXT: R_386_RELATIVE - 0x42F0 | ||||
# RELA-NEXT: R_386_GLOB_DAT func 0x0 | # RELA-NEXT: R_386_GLOB_DAT func 0x0 | ||||
# RELA-NEXT: R_386_TLS_TPOFF tls 0x2A | # RELA-NEXT: R_386_TLS_TPOFF tls 0x0 | ||||
# RELA-NEXT: R_386_32 _start 0x2A | # RELA-NEXT: R_386_32 _start 0x2A | ||||
# RELA-NEXT: } | # RELA-NEXT: } | ||||
# RELA-NEXT: .rela.plt { | # RELA-NEXT: .rela.plt { | ||||
# RELA-NEXT: R_386_JUMP_SLOT func 0x0 | # RELA-NEXT: R_386_JUMP_SLOT func 0x0 | ||||
# RELA-NEXT: } | # RELA-NEXT: } | ||||
.globl _start | .globl _start | ||||
_start: | _start: | ||||
call func@PLT | call func@PLT | ||||
movl func@GOT(%eax), %eax | movl func@GOT(%eax), %eax | ||||
.section .text1,"awx" | .section .text1,"awx" | ||||
movl %gs:tls@NTPOFF+42, %eax | movl tls@GOTNTPOFF(%eax), %eax | ||||
.data | .data | ||||
.long .data | .long .data | ||||
.long _start+42 | .long _start+42 |