aboutsummaryrefslogtreecommitdiffstats
path: root/src/declfunc.lds.S
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-05-25 11:37:40 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-05-25 11:37:40 -0400
commitf582a36e4df16d5709943f7df17a900c8bcc12ab (patch)
tree628d927c4f3e19e54618f7f47c7a44af66bf0c2f /src/declfunc.lds.S
parent37a91e9c10648208de002c75df304e23ca89e256 (diff)
downloadkutter-f582a36e4df16d5709943f7df17a900c8bcc12ab.tar.gz
kutter-f582a36e4df16d5709943f7df17a900c8bcc12ab.tar.xz
kutter-f582a36e4df16d5709943f7df17a900c8bcc12ab.zip
Initial commit of source code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/declfunc.lds.S')
-rw-r--r--src/declfunc.lds.S26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/declfunc.lds.S b/src/declfunc.lds.S
new file mode 100644
index 00000000..9bb5c8ad
--- /dev/null
+++ b/src/declfunc.lds.S
@@ -0,0 +1,26 @@
+// Linker script that defines symbols around sections. The DECL_X()
+// macros need this linker script to place _start and _end symbols
+// around the list of declared items.
+
+#define DECLWRAPPER(NAME) \
+ .progmem.data. ## NAME : SUBALIGN(1) { \
+ NAME ## _start = . ; \
+ *( .progmem.data. ## NAME ##.pre* ) \
+ *( .progmem.data. ## NAME ##* ) \
+ *( .progmem.data. ## NAME ##.post* ) \
+ NAME ## _end = . ; \
+ }
+
+SECTIONS
+{
+ DECLWRAPPER(taskfuncs)
+ DECLWRAPPER(initfuncs)
+ DECLWRAPPER(shutdownfuncs)
+
+ .compile_time_request.static_strings 0 (INFO) : {
+ *( .compile_time_request.static_strings )
+ }
+ .compile_time_request.parsers 0 (INFO) : {
+ *( .compile_time_request.parsers )
+ }
+}