33 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3# RUN: echo "SECTIONS { }" > %t0.script4# RUN: ld.lld --hash-style=sysv -shared %t.o -o %t0.out --script %t0.script5# RUN: llvm-objdump --section-headers %t0.out | FileCheck %s --check-prefix=GOT6# RUN: llvm-objdump -s --section=.got --section=.got.plt %t0.out \7# RUN: | FileCheck %s --check-prefix=GOTDATA8 9# GOT: Sections:10# GOT: .got 00000008 00000000000001b0 DATA11# GOT: .got.plt 00000020 00000000000001b8 DATA12# GOTDATA: Contents of section .got:13# GOTDATA-NEXT: 01b0 00000000 0000000014# GOTDATA-NEXT: Contents of section .got.plt:15# GOTDATA-NEXT: 01b8 e0000000 00000000 00000000 0000000016# GOTDATA-NEXT: 01c8 00000000 00000000 d6000000 0000000017 18# RUN: echo "SECTIONS { .mygot : { *(.got) *(.got.plt) } }" > %t1.script19# RUN: ld.lld --hash-style=sysv -shared %t.o -o %t1.out --script %t1.script20# RUN: llvm-objdump --section-headers %t1.out | FileCheck %s --check-prefix=MYGOT21# RUN: llvm-objdump -s --section=.mygot %t1.out | FileCheck %s --check-prefix=MYGOTDATA22 23# MYGOT: Sections:24# MYGOT: 8 .mygot 00000028 00000000000000e0 DATA25# MYGOT-NOT: .got26# MYGOT-NOT: .got.plt27# MYGOTDATA: 00e0 00000000 00000000 08010000 0000000028# MYGOTDATA-NEXT: 00f0 00000000 00000000 00000000 0000000029# MYGOTDATA-NEXT: 0100 d6000000 0000000030 31mov bar@gotpcrel(%rip), %rax32call foo@plt33