mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
atmega_common: add arch specific XFA ldscript to properly place .roxfa
This commit is contained in:
parent
97e1be0830
commit
6adeec09e9
16
cpu/atmega_common/ldscripts/xfa.ld
Normal file
16
cpu/atmega_common/ldscripts/xfa.ld
Normal file
@ -0,0 +1,16 @@
|
||||
SECTIONS
|
||||
{
|
||||
.data :
|
||||
{
|
||||
/* Special case for AVR (Harvard architecture) where .rodata is merged
|
||||
* into .data by the toolchain default ldscripts. */
|
||||
KEEP (*(SORT(.roxfa.*)))
|
||||
KEEP (*(SORT(.xfa.*)))
|
||||
}
|
||||
__data_start = ADDR(.data);
|
||||
__data_load_start = LOADADDR(.data);
|
||||
__data_end = (__data_start + SIZEOF(.data));
|
||||
__data_load_end = (__data_load_start + SIZEOF(.data));
|
||||
}
|
||||
|
||||
INSERT AFTER .text;
|
@ -9,8 +9,11 @@ CFLAGS_OPT ?= -Os
|
||||
|
||||
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
|
||||
ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG)
|
||||
|
||||
# needed for xfa support. Order is important.
|
||||
LINKFLAGS += -T$(RIOTCPU)/atmega_common/ldscripts/xfa.ld
|
||||
|
||||
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -e reset_handler -Wl,--gc-sections
|
||||
OFLAGS += -j .text -j .data
|
||||
|
||||
# Use ROM_LEN and RAM_LEN during link
|
||||
$(if $(ROM_LEN),,$(error ROM_LEN is not defined))
|
||||
|
Loading…
Reference in New Issue
Block a user