aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-scripts/defined.t
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-scripts/defined.t')
-rw-r--r--ld/testsuite/ld-scripts/defined.t7
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/testsuite/ld-scripts/defined.t b/ld/testsuite/ld-scripts/defined.t
new file mode 100644
index 0000000..c1ef1b6
--- /dev/null
+++ b/ld/testsuite/ld-scripts/defined.t
@@ -0,0 +1,7 @@
+SECTIONS {
+ .text : { *(.text) }
+ .data : { *(.data) }
+ .bss : { *(.bss) *(COMMON) }
+}
+value1 = DEFINED (defined) ? 1 : 2;
+value2 = DEFINED (undefined) ? 1 : 2;