From a23b29d42e9b9cefbcdd76c3708b9eb84f8464cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Mon, 14 May 2018 23:01:40 +0200 Subject: [PATCH] pic32_common: Add CPU specific xfa.ld variant --- cpu/mips_pic32_common/Makefile.include | 3 +-- cpu/mips_pic32_common/ldscripts/xfa.ld | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 cpu/mips_pic32_common/ldscripts/xfa.ld diff --git a/cpu/mips_pic32_common/Makefile.include b/cpu/mips_pic32_common/Makefile.include index 421ce14995..0b1918fd9b 100644 --- a/cpu/mips_pic32_common/Makefile.include +++ b/cpu/mips_pic32_common/Makefile.include @@ -6,7 +6,6 @@ include $(RIOTCPU)/mips32r2_common/Makefile.include CFLAGS += -D_SYS__PTHREADTYPES_H_ CFLAGS += -DCPU_FAM_$(call uppercase_and_underscore,$(CPU_FAM)) - +LINKFLAGS += -L$(RIOTCPU)/mips_pic32_common/ldscripts INCLUDES += -I$(RIOTCPU)/mips_pic32_common/include - DIRS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL) diff --git a/cpu/mips_pic32_common/ldscripts/xfa.ld b/cpu/mips_pic32_common/ldscripts/xfa.ld new file mode 100644 index 0000000000..ef5e17a9a4 --- /dev/null +++ b/cpu/mips_pic32_common/ldscripts/xfa.ld @@ -0,0 +1,21 @@ +SECTIONS +{ + .data : + { + KEEP (*(SORT(.xfa.*))) + } + _fdata = ADDR(.data); + _edata = (_fdata + SIZEOF(.data)); +} + +INSERT BEFORE .sbss; + +SECTIONS +{ + .rodata : + { + KEEP (*(SORT(.roxfa.*))) + } +} + +INSERT AFTER .dtors;