[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.
This commit is contained in:
Travis Geiselbrecht
2015-10-26 16:33:39 -07:00
parent f603756671
commit 0e1ce411ba
22 changed files with 275 additions and 257 deletions

8
dev/devices.ld Normal file
View File

@@ -0,0 +1,8 @@
SECTIONS {
.devices ALIGN(8) : {
__devices = .;
KEEP (*(.devices))
__devices_end = .;
}
}
INSERT AFTER .data;

8
dev/drivers.ld Normal file
View File

@@ -0,0 +1,8 @@
SECTIONS {
.drivers : {
__drivers = .;
KEEP (*(.drivers))
__drivers_end = .;
}
}
INSERT AFTER .rodata;

View File

@@ -12,4 +12,6 @@ MODULE_SRCS += \
$(LOCAL_DIR)/class/fb_api.c \
$(LOCAL_DIR)/class/netif_api.c \
EXTRA_LINKER_SCRIPTS += $(LOCAL_DIR)/devices.ld $(LOCAL_DIR)/drivers.ld
include make/module.mk