File: align5.test

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,436 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (23 lines) | stat: -rw-r--r-- 583 bytes parent folder | download | duplicates (5)
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-unknown-linux %p/Inputs/align.s -o %t.o
# RUN: ld.lld -o %t --script %s %t.o
# RUN: llvm-objdump -t %t | FileCheck %s

SECTIONS {
  . = 0xff8;
  .aaa : {
    *(.aaa)
    foo = ALIGN(., 0x100);
    bar = .;
    zed1 = ALIGN(., 0x100) + 1;
    zed2 = ALIGN(., 0x100) - 1;
  }
  .bbb : { *(.bbb); }
  .ccc : { *(.ccc); }
  .text : { *(.text); }
}

# CHECK: 0000000000001000 .aaa 00000000 foo
# CHECK: 0000000000001000 .aaa 00000000 bar
# CHECK: 0000000000001001 .aaa 00000000 zed1
# CHECK: 0000000000000fff .aaa 00000000 zed2