I'm using atmelstudio to compile a firmware image and want to place the functions from static libraries (including the gnu's libc.a & libgcc.a) in the beginning of the .text section followed .text belong to my project source code. Right now what happen is the other way around.
This is my linker script
. = ALIGN(4);
_sfixed = .;
KEEP(*(.vectors .vectors.*))
*(.text .text.* .gnu.linkonce.t.*) <-- my functions and functions from static libraries are within this rule
*(.glue_7t) *(.glue_7)
*(.rodata .rodata* .gnu.linkonce.r.*)
*(.ARM.extab* .gnu.linkonce.armextab.*)