We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am building a shared library for my own os with armcc(for some reason used the stdlib's 'malloc'), the link options is "--fpic --shared --linker_script="../lscript.ld" ",buf I got a link fault with:Error: L6286E: Relocation #REL:7 in h1_alloc_mt.o(.text) with respect to _malloc_internal. Value(0xfffdae36) out of range(-0x800 - 0x7fe) for (R_ARM_THM_JUMP11), what should i do? thanks
the 'lscript.ld' as bellow(referenced from armcc doc):
SECTIONS
{
. = 0 + SIZEOF_HEADERS;
.note.ABI-tag : { *(.note.ABI-tag) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.version : { *(.version) }
.version_d : { *(.version_d) }
.version_r : { *(.version_r) }
.rel.dyn : { *(.rel.dyn) }
.rela.dyn : { *(.rela.dyn) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
.init : { KEEP (*(.init)) }
.plt : { *(.plt) }
.text : { *(.text .text.*) }
.fini : { KEEP (*(.fini)) }
PROVIDE(__etext = .);
PROVIDE(_etext = .);
PROVIDE(etext = .);
.rodata : { *(.rodata .rodata.*) }
__exidx_start = .;
.ARM.exidx : { *(.ARM.exidx*) }
__exidx_end = .;
.interp : { *(.interp) }
. = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1));
. = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
.tdata : { *(.tdata .tdata.*) }
.tbss : { *(.tbss .tbss.*) }
.preinit_array :
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
}
.init_array :
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
.fini_array :
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
.dynamic : { *(.dynamic) }
.got : { *(.got.plt) *(.got) }
.data :
__data_start = .;
*(.data .data.*)
_edata = .;
PROVIDE(edata = .);
__bss_start = .;
__bss_start__ = .;
.bss :
*(.bss .bss.*)
. = ALIGN(. != 0 ? 32 / 8 : 1);
__bss_end__ = .;
_bss_end__ = .;
. = ALIGN(4);
__end = .;
_end = .;
PROVIDE(end = .);
Hi Joe,
It's help full, my project linked successfully whith the option --no_thumb2_library , and we are also thinking about your opinion about using ARM C libraries 。
Thank your very much for your answer!
fcwindpass
Hi fcwindpass,
Glad to hear it worked - good luck with the rest of your project.
Joe