summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/linkerscript/got-write-offset.s
blob: 323da7b4a46b383bac5dc5637a6ab666a194b129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux-gnu %s -o %t
# RUN: echo "SECTIONS { \
# RUN:   .data 0x1000 : { *(.data) } \
# RUN:   .got 0x2000 : { \
# RUN:     LONG(0) \
# RUN:     *(.got) \
# RUN:   } \
# RUN:  };" > %t.script
# RUN: ld.lld -shared -o %t.out --script %t.script %t
# RUN: llvm-objdump -s %t.out | FileCheck %s
.text
.global foo
foo:
	movl bar@GOT, %eax
.data
.local bar
bar:
	.zero 4
# CHECK:      Contents of section .data:
# CHECK-NEXT:  1000 00000000
# CHECK:      Contents of section .got:
# CHECK-NEXT:  2000 00000000 00100000
OpenPOWER on IntegriCloud