2017-02-18 00:01:51 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
2017-02-21 22:50:38 +08:00
|
|
|
# RUN: echo "SECTIONS {" > %t.script
|
2018-05-11 16:11:25 +08:00
|
|
|
# RUN: echo ". = 0x20; . = 0x10; .text : {} }" >> %t.script
|
2017-07-12 22:50:25 +08:00
|
|
|
# RUN: ld.lld %t.o --script %t.script -o %t -shared
|
|
|
|
# RUN: llvm-objdump -section-headers %t | FileCheck %s
|
|
|
|
# CHECK: Idx Name Size Address
|
2018-05-11 16:11:25 +08:00
|
|
|
# CHECK: 1 .text 00000000 0000000000000010
|
2017-02-21 15:33:38 +08:00
|
|
|
|
|
|
|
# RUN: echo "SECTIONS { . = 0x20; . = ASSERT(0x1, "foo"); }" > %t2.script
|
|
|
|
# RUN: ld.lld %t.o --script %t2.script -o %t -shared
|