[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:
8
dev/devices.ld
Normal file
8
dev/devices.ld
Normal file
@@ -0,0 +1,8 @@
|
||||
SECTIONS {
|
||||
.devices ALIGN(8) : {
|
||||
__devices = .;
|
||||
KEEP (*(.devices))
|
||||
__devices_end = .;
|
||||
}
|
||||
}
|
||||
INSERT AFTER .data;
|
||||
8
dev/drivers.ld
Normal file
8
dev/drivers.ld
Normal file
@@ -0,0 +1,8 @@
|
||||
SECTIONS {
|
||||
.drivers : {
|
||||
__drivers = .;
|
||||
KEEP (*(.drivers))
|
||||
__drivers_end = .;
|
||||
}
|
||||
}
|
||||
INSERT AFTER .rodata;
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user