[ELF] - Cleanup of align.s testcase. NFC.

llvm-svn: 300316
This commit is contained in:
George Rimar 2017-04-14 09:30:50 +00:00
parent 01aa795f82
commit 36a0b98e24
1 changed files with 26 additions and 62 deletions

View File

@ -4,20 +4,11 @@
## Check that ALIGN command workable using location counter
# RUN: echo "SECTIONS { \
# RUN: . = 0x10000; \
# RUN: .aaa : \
# RUN: { \
# RUN: *(.aaa) \
# RUN: } \
# RUN: .aaa : { *(.aaa) } \
# RUN: . = ALIGN(4096); \
# RUN: .bbb : \
# RUN: { \
# RUN: *(.bbb) \
# RUN: } \
# RUN: .bbb : { *(.bbb) } \
# RUN: . = ALIGN(4096 * 4); \
# RUN: .ccc : \
# RUN: { \
# RUN: *(.ccc) \
# RUN: } \
# RUN: .ccc : { *(.ccc) } \
# RUN: }" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -section-headers %t1 | FileCheck %s
@ -25,20 +16,11 @@
## Check that the two argument version of ALIGN command works
# RUN: echo "SECTIONS { \
# RUN: . = ALIGN(0x1234, 0x10000); \
# RUN: .aaa : \
# RUN: { \
# RUN: *(.aaa) \
# RUN: } \
# RUN: .aaa : { *(.aaa) } \
# RUN: . = ALIGN(., 4096); \
# RUN: .bbb : \
# RUN: { \
# RUN: *(.bbb) \
# RUN: } \
# RUN: .bbb : { *(.bbb) } \
# RUN: . = ALIGN(., 4096 * 4); \
# RUN: .ccc : \
# RUN: { \
# RUN: *(.ccc) \
# RUN: } \
# RUN: .ccc : { *(.ccc) } \
# RUN: }" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -section-headers %t1 | FileCheck %s
@ -53,40 +35,22 @@
## Check output sections ALIGN modificator
# RUN: echo "SECTIONS { \
# RUN: . = 0x10000; \
# RUN: .aaa : \
# RUN: { \
# RUN: *(.aaa) \
# RUN: } \
# RUN: .bbb : ALIGN(4096) \
# RUN: { \
# RUN: *(.bbb) \
# RUN: } \
# RUN: .ccc : ALIGN(4096 * 4) \
# RUN: { \
# RUN: *(.ccc) \
# RUN: } \
# RUN: .aaa : { *(.aaa) } \
# RUN: .bbb : ALIGN(4096) { *(.bbb) } \
# RUN: .ccc : ALIGN(4096 * 4) { *(.ccc) } \
# RUN: }" > %t2.script
# RUN: ld.lld -o %t2 --script %t2.script %t
# RUN: llvm-objdump -section-headers %t2 | FileCheck %s
## Check use of variables in align expressions:
# RUN: echo " VAR = 0x1000; \
# RUN: echo "VAR = 0x1000; \
# RUN: __code_base__ = 0x10000; \
# RUN: SECTIONS { \
# RUN: . = __code_base__; \
# RUN: .aaa : \
# RUN: { \
# RUN: *(.aaa) \
# RUN: } \
# RUN: .bbb : ALIGN(VAR) \
# RUN: { \
# RUN: *(.bbb) \
# RUN: } \
# RUN: .aaa : { *(.aaa) } \
# RUN: .bbb : ALIGN(VAR) { *(.bbb) } \
# RUN: . = ALIGN(., VAR * 4); \
# RUN: .ccc : \
# RUN: { \
# RUN: *(.ccc) \
# RUN: } \
# RUN: .ccc : { *(.ccc) } \
# RUN: __start_bbb = ADDR(.bbb); \
# RUN: __end_bbb = ALIGN(__start_bbb + SIZEOF(.bbb), VAR); \
# RUN: }" > %t3.script