Skip to content

Commit

Permalink
* add missing sections for arm-none-eabi-gcc to linkerscript for lpc2387
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegHahm committed Apr 15, 2013
1 parent f88ad9f commit 3e5f91e
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion cpu/lpc2387/linkerscript.x
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ SECTIONS

} >flash /* put all the above into FLASH */
. = ALIGN(4);

/* .ARM.exidx is sorted, so has to go in its own output section. */
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} >flash
__exidx_end = .;

_etext = . ; /* define a global symbol _etext just after the last code byte */

.config :
Expand Down Expand Up @@ -175,7 +184,26 @@ SECTIONS
_data = .; /* create a global symbol marking the start of the .data section */
*(.data) /* all .data sections */
*(.gnu.linkonce.d*)
} >ram /* put all the above into RAM (but load the LMA copy into FLASH) */
. = ALIGN(4);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);

. = ALIGN(4);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);

. = ALIGN(4);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
} >ram /* put all the above into RAM (but load the LMA copy into FLASH) */
. = ALIGN(4); /* ensure data is aligned so relocation can use 4-byte operations */
_edata = .; /* define a global symbol marking the end of the .data section */

Expand Down

0 comments on commit 3e5f91e

Please sign in to comment.