diff options
author | Travis Geiselbrecht <geist@foobox.com> | 2015-10-26 16:33:39 -0700 |
---|---|---|
committer | Travis Geiselbrecht <geist@foobox.com> | 2015-10-26 16:47:18 -0700 |
commit | 0e1ce411bad4875347befe5184bc2efbd686cdc4 (patch) | |
tree | a55f8aff9963d1819ae42e870c8559f312b32024 /top | |
parent | f60375667166d2da1ccb708abf68c736cac60fd6 (diff) | |
download | common-0e1ce411bad4875347befe5184bc2efbd686cdc4.tar.gz |
[make] add ability to set EXTRA_LINKER_SCRIPTS in modules
This allows for individual modules to extend the main linker script,
primarily to add their own sections to interate over.
Remove the main shared_* linker scripts.
Diffstat (limited to 'top')
-rw-r--r-- | top/init.ld | 9 | ||||
-rw-r--r-- | top/rules.mk | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/top/init.ld b/top/init.ld new file mode 100644 index 00000000..2c5de5c2 --- /dev/null +++ b/top/init.ld @@ -0,0 +1,9 @@ +SECTIONS { + .init ALIGN(8) : { + . = ALIGN(8); + __lk_init = .; + KEEP (*(.lk_init)) + __lk_init_end = .; + } +} +INSERT AFTER .rodata; diff --git a/top/rules.mk b/top/rules.mk index c3f8782c..746edb5a 100644 --- a/top/rules.mk +++ b/top/rules.mk @@ -13,4 +13,6 @@ MODULE_SRCS := \ $(LOCAL_DIR)/init.c \ $(LOCAL_DIR)/main.c \ +EXTRA_LINKER_SCRIPTS += $(LOCAL_DIR)/init.ld + include make/module.mk |