# Linker script problems

**URL:** <https://forums.digi.com/t/linker-script-problems/5510>\
**Category:** NET+OS\
**Created:** [September 5, 2003, 10:19am UTC](https://forums.digi.com/t/linker-script-problems/5510 "2003-09-05T10:19:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Doddy](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@Doddy](https://forums.digi.com/u/Doddy)\
**Post date:** [September 5, 2003, 10:19am UTC](https://forums.digi.com/t/linker-script-problems/5510/1 "2003-09-05T10:19:32Z")

</div>

Hi,I am trying to change the mechanism for the bootloader and I am coming across a linker problem when I try to seperate some sections. Below is part of my new linker script that I am using for testing: MEMORY {ram\_data : ORIGIN = 0x1000, LENGTH = 16000k} MEMORY {rom\_text : ORIGIN = 0xa000000, LENGTH = 4000k} MEMORY {image\_text : ORIGIN = 0x0400000, LENGTH = 2M} ENTRY(\_\_vectors) SECTIONS { .image\_stuff : AT (\_endtext + SIZEOF(restartBuf) + SIZEOF(.data) + SIZEOF(.bss)) { objs/image.o } \> rom\_text .init : { \*(.init) } \> rom\_text .text : { btext = .; \*(.text) _(.gnu.linkonce.t_) \*(.rodata) …the rest of the linker is the same } this links fine, and I can see the ‘image\_stuff’ section when using objdump. However this is still running the code from ROM and I want this section to run in RAM. If I change the ‘\> rom\_text’ to ‘\> image\_text’ of the image\_stuff section I get errors reported: relocation truncated to fit: R\_ARM\_PC24 NALedGreenOn NALedGreenOn is used in image.o Any help would be really appreciated! Cheers Mark

---

<div class="post-metadata">

**Author:** ![Doddy](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@Doddy](https://forums.digi.com/u/Doddy)\
**Post date:** [September 5, 2003, 11:06am UTC](https://forums.digi.com/t/linker-script-problems/5510/2 "2003-09-05T11:06:56Z")

</div>

Just to add to my message. Whilst hunting the internet for clues I found a switch option that I believe should help. -mlong-calls this turns all b asm instructions to bl instructions. Unfortunatley gcc doesn’t seem to recognise this switch!? Can anyone tell me why it isnt recognised. Cheers
