2014-12-22 12:35:05 +01:00
|
|
|
/* This linker script generated from xt-genldscripts.tpp for LSP . */
|
|
|
|
/* Linker Script for ld -N */
|
|
|
|
MEMORY
|
|
|
|
{
|
2015-10-05 08:53:23 +02:00
|
|
|
dport0_0_seg : org = 0x3FF00000, len = 0x10
|
|
|
|
dram0_0_seg : org = 0x3FFE8000, len = 0x14000
|
|
|
|
iram1_0_seg : org = 0x40100000, len = 0x8000
|
2019-04-05 17:01:45 +02:00
|
|
|
iram0_0_seg : org = 0x4010E000, len = 0x2000
|
2017-03-22 01:24:32 +01:00
|
|
|
irom0_0_seg : org = 0x40210000, len = 0xE0000
|
2014-12-22 12:35:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
PHDRS
|
|
|
|
{
|
|
|
|
dport0_0_phdr PT_LOAD;
|
|
|
|
dram0_0_phdr PT_LOAD;
|
|
|
|
dram0_0_bss_phdr PT_LOAD;
|
|
|
|
iram1_0_phdr PT_LOAD;
|
2019-04-05 17:01:45 +02:00
|
|
|
iram0_0_phdr PT_LOAD;
|
2014-12-22 12:35:05 +01:00
|
|
|
irom0_0_phdr PT_LOAD;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Default entry point: */
|
2019-04-05 17:01:45 +02:00
|
|
|
ENTRY(call_user_start)
|
2015-10-05 08:53:23 +02:00
|
|
|
EXTERN(_DebugExceptionVector)
|
|
|
|
EXTERN(_DoubleExceptionVector)
|
|
|
|
EXTERN(_KernelExceptionVector)
|
|
|
|
EXTERN(_NMIExceptionVector)
|
|
|
|
EXTERN(_UserExceptionVector)
|
2014-12-22 12:35:05 +01:00
|
|
|
PROVIDE(_memmap_vecbase_reset = 0x40000000);
|
|
|
|
/* Various memory-map dependent cache attribute settings: */
|
|
|
|
_memmap_cacheattr_wb_base = 0x00000110;
|
|
|
|
_memmap_cacheattr_wt_base = 0x00000110;
|
|
|
|
_memmap_cacheattr_bp_base = 0x00000220;
|
|
|
|
_memmap_cacheattr_unused_mask = 0xFFFFF00F;
|
|
|
|
_memmap_cacheattr_wb_trapnull = 0x2222211F;
|
|
|
|
_memmap_cacheattr_wba_trapnull = 0x2222211F;
|
|
|
|
_memmap_cacheattr_wbna_trapnull = 0x2222211F;
|
|
|
|
_memmap_cacheattr_wt_trapnull = 0x2222211F;
|
|
|
|
_memmap_cacheattr_bp_trapnull = 0x2222222F;
|
|
|
|
_memmap_cacheattr_wb_strict = 0xFFFFF11F;
|
|
|
|
_memmap_cacheattr_wt_strict = 0xFFFFF11F;
|
|
|
|
_memmap_cacheattr_bp_strict = 0xFFFFF22F;
|
|
|
|
_memmap_cacheattr_wb_allvalid = 0x22222112;
|
|
|
|
_memmap_cacheattr_wt_allvalid = 0x22222112;
|
|
|
|
_memmap_cacheattr_bp_allvalid = 0x22222222;
|
|
|
|
PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull);
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
|
|
|
|
.dport0.rodata : ALIGN(4)
|
|
|
|
{
|
|
|
|
_dport0_rodata_start = ABSOLUTE(.);
|
|
|
|
*(.dport0.rodata)
|
|
|
|
*(.dport.rodata)
|
|
|
|
_dport0_rodata_end = ABSOLUTE(.);
|
|
|
|
} >dport0_0_seg :dport0_0_phdr
|
|
|
|
|
|
|
|
.dport0.literal : ALIGN(4)
|
|
|
|
{
|
|
|
|
_dport0_literal_start = ABSOLUTE(.);
|
|
|
|
*(.dport0.literal)
|
|
|
|
*(.dport.literal)
|
|
|
|
_dport0_literal_end = ABSOLUTE(.);
|
|
|
|
} >dport0_0_seg :dport0_0_phdr
|
|
|
|
|
|
|
|
.dport0.data : ALIGN(4)
|
|
|
|
{
|
|
|
|
_dport0_data_start = ABSOLUTE(.);
|
|
|
|
*(.dport0.data)
|
|
|
|
*(.dport.data)
|
|
|
|
_dport0_data_end = ABSOLUTE(.);
|
|
|
|
} >dport0_0_seg :dport0_0_phdr
|
|
|
|
|
2016-12-01 22:14:20 +01:00
|
|
|
.text : ALIGN(4)
|
2015-01-05 03:09:51 +01:00
|
|
|
{
|
2016-12-01 22:14:20 +01:00
|
|
|
_stext = .;
|
|
|
|
_text_start = ABSOLUTE(.);
|
|
|
|
*(.UserEnter.text)
|
|
|
|
. = ALIGN(16);
|
|
|
|
*(.DebugExceptionVector.text)
|
|
|
|
. = ALIGN(16);
|
|
|
|
*(.NMIExceptionVector.text)
|
|
|
|
. = ALIGN(16);
|
|
|
|
*(.KernelExceptionVector.text)
|
|
|
|
LONG(0)
|
|
|
|
LONG(0)
|
|
|
|
LONG(0)
|
|
|
|
LONG(0)
|
|
|
|
. = ALIGN(16);
|
|
|
|
*(.UserExceptionVector.text)
|
|
|
|
LONG(0)
|
|
|
|
LONG(0)
|
|
|
|
LONG(0)
|
|
|
|
LONG(0)
|
|
|
|
. = ALIGN(16);
|
|
|
|
*(.DoubleExceptionVector.text)
|
|
|
|
LONG(0)
|
|
|
|
LONG(0)
|
|
|
|
LONG(0)
|
|
|
|
LONG(0)
|
|
|
|
. = ALIGN (16);
|
|
|
|
*(.entry.text)
|
|
|
|
*(.init.literal)
|
|
|
|
*(.init)
|
2019-05-19 15:38:23 +02:00
|
|
|
/*
|
|
|
|
* SDK libraries that used in bootup process, interruption handling
|
|
|
|
* and other ways where flash cache (iROM) is unavailable:
|
|
|
|
*/
|
2020-04-27 02:13:38 +02:00
|
|
|
*libmain.a:*( .literal .literal.* .text .text.*)
|
|
|
|
*libphy.a:*( .literal .literal.* .text .text.*)
|
|
|
|
*libpp.a:*( .literal .literal.* .text .text.*)
|
|
|
|
*libgcc.a:_ashrdi3.o( .literal .literal.* .text .text.*)
|
|
|
|
*libgcc.a:_divsf3.o( .literal .literal.* .text .text.*)
|
|
|
|
*libgcc.a:_fixsfsi.o( .literal .literal.* .text .text.*)
|
|
|
|
*libgcc.a:_modsi3.o( .literal .literal.* .text .text.*)
|
|
|
|
*libnet80211.a:*( .literal .text )
|
2019-05-19 15:38:23 +02:00
|
|
|
/*
|
|
|
|
* The following SDK libraries have .literal and .text sections, but are
|
|
|
|
* either not used in NodeMCU or are safe to execute out of in iROM:
|
|
|
|
* libat.a libcrypto.a libdriver.a libnet80211.a libespnow.a
|
|
|
|
* liblwip_536.a ibpwm.a libwpa.a ibwps.a
|
|
|
|
*/
|
2018-04-07 22:44:42 +02:00
|
|
|
*(.iram.text .iram0.text .iram0.text.*)
|
2019-05-17 14:04:19 +02:00
|
|
|
*(.iram0.data.*)
|
2015-10-08 04:33:15 +02:00
|
|
|
|
2016-12-01 22:14:20 +01:00
|
|
|
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
|
2019-02-17 19:26:29 +01:00
|
|
|
|
2016-12-01 22:14:20 +01:00
|
|
|
*(.fini.literal)
|
|
|
|
*(.fini)
|
|
|
|
*(.gnu.version)
|
|
|
|
_text_end = ABSOLUTE(.);
|
|
|
|
_etext = .;
|
|
|
|
} >iram1_0_seg :iram1_0_phdr
|
2015-01-05 03:09:51 +01:00
|
|
|
|
2014-12-22 12:35:05 +01:00
|
|
|
.data : ALIGN(4)
|
|
|
|
{
|
|
|
|
_data_start = ABSOLUTE(.);
|
|
|
|
*(.data)
|
|
|
|
*(.data.*)
|
|
|
|
*(.gnu.linkonce.d.*)
|
|
|
|
*(.data1)
|
|
|
|
*(.sdata)
|
|
|
|
*(.sdata.*)
|
|
|
|
*(.gnu.linkonce.s.*)
|
|
|
|
*(.sdata2)
|
|
|
|
*(.sdata2.*)
|
|
|
|
*(.gnu.linkonce.s2.*)
|
|
|
|
*(.jcr)
|
|
|
|
_data_end = ABSOLUTE(.);
|
|
|
|
} >dram0_0_seg :dram0_0_phdr
|
|
|
|
|
|
|
|
.rodata : ALIGN(4)
|
|
|
|
{
|
|
|
|
_rodata_start = ABSOLUTE(.);
|
2016-12-01 22:14:20 +01:00
|
|
|
|
|
|
|
*(.rodata.dram .rodata.dram*)
|
|
|
|
|
2014-12-22 12:35:05 +01:00
|
|
|
*(.gnu.linkonce.r.*)
|
|
|
|
__XT_EXCEPTION_TABLE__ = ABSOLUTE(.);
|
|
|
|
*(.xt_except_table)
|
|
|
|
*(.gcc_except_table)
|
|
|
|
*(.gnu.linkonce.e.*)
|
|
|
|
*(.gnu.version_r)
|
|
|
|
*(.eh_frame)
|
|
|
|
/* C++ constructor and destructor tables, properly ordered: */
|
|
|
|
KEEP (*crtbegin.o(.ctors))
|
|
|
|
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
|
|
|
KEEP (*(SORT(.ctors.*)))
|
|
|
|
KEEP (*(.ctors))
|
|
|
|
KEEP (*crtbegin.o(.dtors))
|
|
|
|
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
|
|
|
KEEP (*(SORT(.dtors.*)))
|
|
|
|
KEEP (*(.dtors))
|
|
|
|
/* C++ exception handlers table: */
|
|
|
|
__XT_EXCEPTION_DESCS__ = ABSOLUTE(.);
|
|
|
|
*(.xt_except_desc)
|
|
|
|
*(.gnu.linkonce.h.*)
|
|
|
|
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
|
|
|
|
*(.xt_except_desc_end)
|
|
|
|
*(.dynamic)
|
|
|
|
*(.gnu.version_d)
|
|
|
|
. = ALIGN(4); /* this table MUST be 4-byte aligned */
|
|
|
|
_bss_table_start = ABSOLUTE(.);
|
|
|
|
LONG(_bss_start)
|
|
|
|
LONG(_bss_end)
|
|
|
|
_bss_table_end = ABSOLUTE(.);
|
|
|
|
_rodata_end = ABSOLUTE(.);
|
|
|
|
} >dram0_0_seg :dram0_0_phdr
|
|
|
|
|
|
|
|
.bss ALIGN(8) (NOLOAD) : ALIGN(4)
|
|
|
|
{
|
|
|
|
. = ALIGN (8);
|
|
|
|
_bss_start = ABSOLUTE(.);
|
|
|
|
*(.dynsbss)
|
|
|
|
*(.sbss)
|
|
|
|
*(.sbss.*)
|
|
|
|
*(.gnu.linkonce.sb.*)
|
|
|
|
*(.scommon)
|
|
|
|
*(.sbss2)
|
|
|
|
*(.sbss2.*)
|
|
|
|
*(.gnu.linkonce.sb2.*)
|
|
|
|
*(.dynbss)
|
|
|
|
*(.bss)
|
|
|
|
*(.bss.*)
|
|
|
|
*(.gnu.linkonce.b.*)
|
|
|
|
*(COMMON)
|
|
|
|
. = ALIGN (8);
|
|
|
|
_bss_end = ABSOLUTE(.);
|
2017-10-28 22:16:09 +02:00
|
|
|
*(.noinit)
|
2014-12-22 12:35:05 +01:00
|
|
|
_heap_start = ABSOLUTE(.);
|
|
|
|
/* _stack_sentry = ALIGN(0x8); */
|
|
|
|
} >dram0_0_seg :dram0_0_bss_phdr
|
|
|
|
/* __stack = 0x3ffc8000; */
|
|
|
|
|
2015-10-05 08:53:23 +02:00
|
|
|
.lit4 : ALIGN(4)
|
|
|
|
{
|
|
|
|
_lit4_start = ABSOLUTE(.);
|
|
|
|
*(*.lit4)
|
|
|
|
*(.lit4.*)
|
|
|
|
*(.gnu.linkonce.lit4.*)
|
|
|
|
_lit4_end = ABSOLUTE(.);
|
|
|
|
} >iram1_0_seg :iram1_0_phdr
|
|
|
|
|
2019-04-05 17:01:45 +02:00
|
|
|
.pre_init_ram : ALIGN(0x1000)
|
|
|
|
{
|
|
|
|
_iram0_start = ABSOLUTE(.);
|
|
|
|
*(*.pre_init)
|
|
|
|
_iram0_end = ABSOLUTE(.);
|
|
|
|
} >iram0_0_seg :iram0_0_phdr
|
|
|
|
|
2016-12-01 22:14:20 +01:00
|
|
|
.irom0.text : ALIGN(0x1000)
|
|
|
|
{
|
|
|
|
_irom0_text_start = ABSOLUTE(.);
|
2019-05-01 19:29:11 +02:00
|
|
|
KEEP(*(.irom0.ptable))
|
2019-04-05 17:01:45 +02:00
|
|
|
. = ALIGN(0x1000);
|
2016-12-01 22:14:20 +01:00
|
|
|
*(.servercert.flash)
|
|
|
|
*(.clientcert.flash)
|
2019-04-05 17:01:45 +02:00
|
|
|
. = ALIGN(0x1000);
|
2016-12-01 22:14:20 +01:00
|
|
|
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
|
|
|
|
*(.literal .text .literal.* .text.*)
|
|
|
|
*(.rodata*)
|
|
|
|
*(.sdk.version)
|
|
|
|
|
|
|
|
/* Link-time arrays containing the defs for the included modules */
|
2020-04-27 02:13:38 +02:00
|
|
|
. = ALIGN(8);
|
2018-03-08 01:20:59 +01:00
|
|
|
lua_libs_base = ABSOLUTE(.);
|
2016-12-01 22:14:20 +01:00
|
|
|
/* Allow either empty define or defined-to-1 to include the module */
|
|
|
|
KEEP(*(.lua_libs))
|
2020-04-27 02:13:38 +02:00
|
|
|
*liblua.a:linit.o(.lua_libs)
|
|
|
|
*(.lua_libs)
|
2016-12-01 22:14:20 +01:00
|
|
|
LONG(0) LONG(0) /* Null-terminate the array */
|
2018-03-08 01:20:59 +01:00
|
|
|
lua_rotable_base = ABSOLUTE(.);
|
2016-12-01 22:14:20 +01:00
|
|
|
KEEP(*(.lua_rotable))
|
|
|
|
LONG(0) LONG(0) /* Null-terminate the array */
|
|
|
|
|
2019-02-17 19:26:29 +01:00
|
|
|
/* SDK doesn't use libc functions, and are therefore safe to put in flash */
|
2016-12-01 22:14:20 +01:00
|
|
|
*/libc.a:*.o(.text* .literal*)
|
|
|
|
/* end libc functions */
|
|
|
|
|
2018-06-22 23:29:16 +02:00
|
|
|
/* Reserved areas, flash page aligned and last */
|
|
|
|
. = ALIGN(4096);
|
|
|
|
|
2016-12-01 22:14:20 +01:00
|
|
|
_irom0_text_end = ABSOLUTE(.);
|
|
|
|
_flash_used_end = ABSOLUTE(.);
|
|
|
|
} >irom0_0_seg :irom0_0_phdr =0xffffffff
|
2014-12-22 12:35:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* get ROM code address */
|
2015-10-07 03:02:49 +02:00
|
|
|
INCLUDE "eagle.rom.addr.v6.ld"
|