This is a part of https://bugs.llvm.org/show_bug.cgi?id=39885 Linker script specification says: "You can specify a file name to include sections from a particular file. You would do this if one or more of your files contain special data that needs to be at a particular location in memory." LLD did not accept this syntax. The patch implements it. Differential revision: https://reviews.llvm.org/D55324 llvm-svn: 348463
18 lines
624 B
ArmAsm
18 lines
624 B
ArmAsm
# REQUIRES: x86
|
|
# RUN: echo '.section .bar, "a"; .quad 1;' | \
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %tfile1.o
|
|
# RUN: echo '.section .zed, "a"; .quad 2;' | \
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %tfile2.o
|
|
|
|
## We have a file name and no input sections description. In that case, all
|
|
## sections from the file specified should be included. Check that.
|
|
# RUN: ld.lld -o %t --script %s %tfile1.o %tfile2.o
|
|
# RUN: llvm-objdump -s %t | FileCheck %s
|
|
|
|
# CHECK: Contents of section .foo:
|
|
# CHECK-NEXT: 01000000 00000000 02000000 00000000
|
|
|
|
SECTIONS {
|
|
.foo : { *file1.o *file2.o }
|
|
}
|