summaryrefslogtreecommitdiffstats
path: root/lld/test/LinkerScript
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2015-05-28 00:14:58 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2015-05-28 00:14:58 +0000
commitcc0554d05779411f01a09a8a1f04d370c3f0cf5e (patch)
tree6ea2afc2588b915047042ba8a96f3d3c3a50243a /lld/test/LinkerScript
parent95a192a3abdd9ab817b5241c7a9c9fec304784d5 (diff)
downloadbcm5719-llvm-cc0554d05779411f01a09a8a1f04d370c3f0cf5e.tar.gz
bcm5719-llvm-cc0554d05779411f01a09a8a1f04d370c3f0cf5e.zip
Add PHDR and FILL parsing.
llvm-svn: 238383
Diffstat (limited to 'lld/test/LinkerScript')
-rw-r--r--lld/test/LinkerScript/phdrs-sections.test29
-rw-r--r--lld/test/LinkerScript/sections.test6
2 files changed, 35 insertions, 0 deletions
diff --git a/lld/test/LinkerScript/phdrs-sections.test b/lld/test/LinkerScript/phdrs-sections.test
new file mode 100644
index 00000000000..872b7999cb7
--- /dev/null
+++ b/lld/test/LinkerScript/phdrs-sections.test
@@ -0,0 +1,29 @@
+/*
+ Test PHDR parsing and section -> phdr mapping.
+ RUN: linker-script-test %s | FileCheck %s
+*/
+
+PHDRS
+{
+ ph_text PT_LOAD FLAGS (0x1 | 0x4);
+ ph_data PT_LOAD FLAGS (0x2 | 0x4);
+}
+
+SECTIONS
+{
+ .init : {} : ph_text
+}
+
+/*
+CHECK: PHDRS
+CHECK: {
+CHECK: ph_text 1 FLAGS (5);
+CHECK: ph_data 1 FLAGS (6);
+CHECK: }
+CHECK: SECTIONS
+CHECK: {
+CHECK: .init :
+CHECK: {
+CHECK: } : ph_text
+CHECK: }
+*/
diff --git a/lld/test/LinkerScript/sections.test b/lld/test/LinkerScript/sections.test
index 8f7d0141804..67f8288bada 100644
--- a/lld/test/LinkerScript/sections.test
+++ b/lld/test/LinkerScript/sections.test
@@ -26,6 +26,7 @@ SECTIONS
}
.init :
{
+ FILL (0x90909090)
KEEP (*(SORT_NONE(.init)))
} =0x909090909090909090909090
PROVIDE (__etext = .);
@@ -181,6 +182,10 @@ CHECK: r_brace: }
CHECK: identifier: .init
CHECK: colon: :
CHECK: l_brace: {
+CHECK: kw_fill: FILL
+CHECK: l_paren: (
+CHECK: number: 0x90909090
+CHECK: r_paren: )
CHECK: kw_keep: KEEP
CHECK: l_paren: (
CHECK: star: *
@@ -556,6 +561,7 @@ CHECK: PROVIDE_HIDDEN(__rela_iplt_end = .)
CHECK: }
CHECK: .init :
CHECK: {
+CHECK: FILL(0x90909090)
CHECK: KEEP(*(SORT_NONE(.init)))
CHECK: } =0x909090909090909090909090
CHECK: PROVIDE(__etext = .)
OpenPOWER on IntegriCloud