summaryrefslogtreecommitdiffstats
path: root/lld/test/LinkerScript/linker-script.test
diff options
context:
space:
mode:
authorRafael Auler <rafaelauler@gmail.com>2014-11-03 04:09:51 +0000
committerRafael Auler <rafaelauler@gmail.com>2014-11-03 04:09:51 +0000
commit347fb020932b617116ee01259ade235669c51d46 (patch)
tree7960a63ecbf41fa0a9d5f01e940bbd07068a10fe /lld/test/LinkerScript/linker-script.test
parent5f2764d88687910b6eb013b6e1c1e9744fc1ce93 (diff)
downloadbcm5719-llvm-347fb020932b617116ee01259ade235669c51d46.tar.gz
bcm5719-llvm-347fb020932b617116ee01259ade235669c51d46.zip
[lld] Teach LLD how to parse most linker scripts
This patch does *not* implement any semantic actions, but it is a first step to teach LLD how to read complete linker scripts. The additional linker scripts statements whose parsing is now supported are: * SEARCH_DIR directive * SECTIONS directive * Symbol definitions inside SECTIONS including PROVIDE and PROVIDE_HIDDEN * C-like expressions used in many places in linker scripts * Input to output sections mapping The goal of this commit was guided towards completely parsing a default GNU ld linker script and the linker script used to link the FreeBSD kernel. Thus, it also adds a test case based on the default linker script used in GNU ld for x86_64 ELF targets. I tested SPEC userland programs linked by GNU ld, using the linker script dump'ed by this parser, and everything went fine. I then tested linking the FreeBSD kernel with a dump'ed linker script, installed the new kernel and booted it, everything went fine. Directives that still need to be implemented: * MEMORY * PHDRS Reviewers: silvas, shankarke and ruiu http://reviews.llvm.org/D5852 llvm-svn: 221126
Diffstat (limited to 'lld/test/LinkerScript/linker-script.test')
-rw-r--r--lld/test/LinkerScript/linker-script.test2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/test/LinkerScript/linker-script.test b/lld/test/LinkerScript/linker-script.test
index 4c6643566c7..a12f47791bd 100644
--- a/lld/test/LinkerScript/linker-script.test
+++ b/lld/test/LinkerScript/linker-script.test
@@ -35,7 +35,7 @@ CHECK: l_paren: (
CHECK: identifier: init
CHECK: r_paren: )
CHECK: eof:
-CHECK: OUTPUT_FORMAT(elf64-x86-64,elf64-x86-64,elf64-x86-64)
+CHECK: OUTPUT_FORMAT("elf64-x86-64","elf64-x86-64","elf64-x86-64")
CHECK: GROUP(/lib/x86_64-linux-gnu/libc.so.6 /usr/lib/x86_64-linux-gnu/libc_nonshared.a AS_NEEDED(/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2) -lm -l:libgcc.a)
CHECK: ENTRY(init)
*/
OpenPOWER on IntegriCloud