summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/linkerscript/edata-etext.s
blob: c15cf4c865c0545abdf5e39d1453afc8551e78c5 (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=x86_64-pc-linux %s -o %t.o
# RUN: echo "SECTIONS { }" > %t.script
# RUN: not ld.lld %t.o -script %t.script -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: undefined symbol: _edata
# CHECK: >>> referenced by {{.*}}:(.text+0x0)
# CHECK: error: undefined symbol: _etext
# CHECK: >>> referenced by {{.*}}:(.text+0x8)
# CHECK: error: undefined symbol: _end
# CHECK: >>> referenced by {{.*}}:(.text+0x10)

.global _start,_end,_etext,_edata
.text
_start:
 .quad _edata + 0x1
 .quad _etext + 0x1
 .quad _end + 0x1

.data
  .word 1
.bss
  .align 4
  .space 6
OpenPOWER on IntegriCloud