aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-loongarch-elf/relr-discard.s
blob: b52374a54982da3f9ed2a07f2313cacf98423a83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Test DT_RELR with references in discarded sections.

.text
.p2align 3
.global _start
_start:
	nop

sym_local:
	nop

.global sym_hidden
.hidden sym_hidden
sym_hidden:
	nop

.global sym_global
sym_global:
	nop

.global sym_global_abs
.set sym_global_abs, 42

.global sym_weak_undef
.weak sym_weak_undef

.section .discard.got_local,"ax"
	la.got $a0, sym_local

.section .discard.got_global,"ax"
	la.got $a0, sym_global

.section .discard.local,"a"
.p2align 1
discard_local:
.quad sym_local

.section .discard.hidden,"a"
.p2align 1
discard_hidden:
.quad sym_hidden

.section .discard.global,"a"
.p2align 1
discard_global:
.quad sym_global

.section .discard.global_abs,"a"
.p2align 1
discard_global_abs:
.quad sym_global_abs

.section .discard.weak_undef,"a"
.p2align 1
discard_weak_undef:
.quad sym_weak_undef

.section .discard._DYNAMIC,"a"
.p2align 1
discard_DYNAMIC:
.quad _DYNAMIC