[gn] port afa8aeeeec (RISCVGenExegesis.inc)
[llvm-project.git] / lld / test / ELF / linkerscript / at.s
blobf1681656c38b78e77b3e1d355cb759fdc00131b0
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
3 # RUN: echo "SECTIONS { \
4 # RUN: . = 0x1000; \
5 # RUN: .aaa : AT(0x2000) { *(.aaa) } \
6 # RUN: .bbb : { *(.bbb) } \
7 # RUN: .ccc : AT(0x3000) { *(.ccc) } \
8 # RUN: .ddd : AT(0x4000) { *(.ddd) } \
9 # RUN: .eee 0x5000 : AT(0x5000) { *(.eee) } \
10 # RUN: }" > %t.script
11 # RUN: ld.lld %t.o --script %t.script -o %t
12 # RUN: llvm-readelf -l %t | FileCheck %s
14 # CHECK: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
15 # CHECK-NEXT: LOAD 0x001000 0x0000000000001000 0x0000000000002000 0x000010 0x000010 R 0x1000
16 # CHECK-NEXT: LOAD 0x001010 0x0000000000001010 0x0000000000003000 0x000008 0x000008 R 0x1000
17 # CHECK-NEXT: LOAD 0x001018 0x0000000000001018 0x0000000000004000 0x000008 0x000008 R 0x1000
18 # CHECK-NEXT: LOAD 0x002000 0x0000000000005000 0x0000000000005000 0x000008 0x000008 R 0x1000
19 # CHECK-NEXT: LOAD 0x002008 0x0000000000005008 0x0000000000005008 0x000001 0x000001 R E 0x1000
21 .global _start
22 _start:
23 nop
25 .section .aaa, "a"
26 .quad 0
28 .section .bbb, "a"
29 .quad 0
31 .section .ccc, "a"
32 .quad 0
34 .section .ddd, "a"
35 .quad 0
37 .section .eee, "a"
38 .quad 0