Files
clang-p2996/lld/test/ELF/linkerscript/align-r.test
Jordan Rupprecht 5bd334aef7 [lld][NFC] Update tests to use -S instead of -s when using llvm-readelf.
Summary: llvm-readobj/readelf accepts both -s and -S as aliases for --sections. However with GNU readelf only -S means --section, and -s means --symbols. I would like to make llvm-readelf more compatible.

Reviewers: MaskRay, espindola

Reviewed By: MaskRay

Subscribers: emaste, arichardson, steven_wu, dexonsmith, llvm-commits

Differential Revision: https://reviews.llvm.org/D54118

llvm-svn: 346164
2018-11-05 20:39:06 +00:00

22 lines
764 B
Plaintext

# REQUIRES: x86
## Check output section ALIGN modifier with -r
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/align.s -o %t1.o
# RUN: ld.lld -r -o %t2.o --script %s %t1.o
# RUN: llvm-readelf -S %t2.o | FileCheck %s
# CHECK: Section Headers:
# CHECK-NEXT: Name Type Address Off Size ES Flg Lk Inf Al
# CHECK-NEXT: NULL 0000000000000000 000000 000000 00
# CHECK-NEXT: .aaa PROGBITS 0000000000000000 000040 000008 00 A 0 0 1
# CHECK-NEXT: .bbb PROGBITS 0000000000000000 001000 000008 00 A 0 0 4096
# CHECK-NEXT: .ccc PROGBITS 0000000000000000 004000 000008 00 A 0 0 16384
SECTIONS {
. = 0x10000;
.aaa : { *(.aaa) }
.bbb : ALIGN(4096) { *(.bbb) }
.ccc : ALIGN(4096 * 4) { *(.ccc) }
}