summaryrefslogtreecommitdiffstats
path: root/template.S
diff options
context:
space:
mode:
Diffstat (limited to 'template.S')
-rw-r--r--template.S28
1 files changed, 20 insertions, 8 deletions
diff --git a/template.S b/template.S
index 2e6cbdb..2b231f9 100644
--- a/template.S
+++ b/template.S
@@ -1,10 +1,22 @@
+#ifdef __USER_LABEL_PREFIX__
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+#else
+#define SYM(x) x
+#endif
+
+#define SYM_START(x) CONCAT1(CONCAT1(_binary_, SYM(x)), _start)
+#define SYM_END(x) CONCAT1(CONCAT1(_binary_, SYM(x)), _end)
+#define SYM_SIZE(x) CONCAT1(CONCAT1(_binary_, SYM(x)), _size)
+
.section .data
-_binary_SYMBOL_PREFIX_start:
-.incbin "FILENAME"
+SYM_START(SYMBOL_PREFIX):
+.incbin FILENAME
.align 4
-_binary_SYMBOL_PREFIX_end:
-_binary_SYMBOL_PREFIX_size:
- .long _binary_SYMBOL_PREFIX_end - _binary_SYMBOL_PREFIX_start
-.globl _binary_SYMBOL_PREFIX_start
-.globl _binary_SYMBOL_PREFIX_end
-.globl _binary_SYMBOL_PREFIX_size
+SYM_END(SYMBOL_PREFIX):
+SYM_SIZE(SYMBOL_PREFIX):
+ .long SYM_END(SYMBOL_PREFIX) - SYM_START(SYMBOL_PREFIX)
+.globl SYM_START(SYMBOL_PREFIX)
+.globl SYM_END(SYMBOL_PREFIX)
+.globl SYM_SIZE(SYMBOL_PREFIX)
OpenPOWER on IntegriCloud