Questions tagged [linker-scripts]

The linker command language used to control the memory layout of computer programs and details of the linking process.

Linker scripts contain a command language processed by the linker to determine how sections in input files are mapped into the output file. Most often used to control the memory layout in computer programs, they can also exercise fine control over details of the linking process.

453 questions
0
votes
1 answer

Making copies of an application

I am working on a multicore processor. I want to make an AMP system, that is -- I have one application successfully running on core0, I want exactly the same application to run core1 too. But both the applications will not interact with each other…
0
votes
2 answers

how to solve this linker script error?

I created a linker script file as memory.ld – MEMORY { MYMEMORY(rw) : ORIGIN = 0x0041c620 , LENGTH = 30 } .myvars (NOLOAD) : { *(.myvarloc) } > MYMEMORY In my c program : __attribute__((section(".myvarloc"))) uint8…
user3252048
  • 77
  • 1
  • 12
0
votes
1 answer

How to use this linker script program?

If I write a code in my program.c as a global declaration : #pragma DATA_SECTION (measurements, ".myvarloc"); uint8 measurements[30]; i write the below code and save it as a.ld: MEMORY { MYMEMORY(rw) : ORIGIN = 0x0041c620 , LENGTH =…
0
votes
1 answer

how to get 18 bit code address from symbol defined in linker command file

In Code Composer, you can define new symbols in the linker command file simply: _Addr_start = 0x5C00; _AppLength = 0x4C000; before the memory map and section assignment. This is done in the bootloader example from TI. You can then refer to the…
Mark Lakata
  • 19,989
  • 5
  • 106
  • 123
0
votes
1 answer

ARM GNU GCC linker

This is related to GNU linker.If I have a section which is other than .text , .data or .bss how do I tell linker not to include that section in any of those segments. Ex: SECTIONS { .text {} .data {} .bss {} .sec_var {} } Actually in my case…
user2807984
  • 23
  • 2
  • 7
0
votes
1 answer

Adding section to GNU linker script

Hi I am trying to define a custom section in my linker script in a following way: .version_section(__custom_data__) : { KEEP (*version_info.o (.rodata* .data* .sdata*)) } I am compiling a C file that contains a structure and I want…
Steve H
  • 461
  • 2
  • 10
  • 18
0
votes
1 answer

Memory sections in GNU linker script for Cortex-M4

I'm dissapointed, because I can't find an information about memory segmentation. I know that I should divide memory into basic sections such as .text, .data, .bss, .stack, that are used in object files of compiled program. I know that there are many…
bkdi
  • 33
  • 6
0
votes
2 answers

Meaning of arm loader script

OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_ram_entry) SECTIONS { . = 0xA0008000; . = ALIGN(4); .text : { *(.text) } . = ALIGN(4); .rodata : { *(.rodata) } . = ALIGN(4); …
Young Hyun Yoo
  • 598
  • 10
  • 21
0
votes
1 answer

Unexpected linker section output location

I'm trying to use the ld command in linux on an assembly file for a kernel. For it to boot with grub, it needs to be after the 1Mb address. So my link script has the text going to the address 0x00100000. Here's the linker script I'm using: …
skagzilla
  • 325
  • 2
  • 10
0
votes
0 answers

ORG assembly directive and location counter in linker script

As far as I understand using the ORG directive in assembly (NASM assembly in particular) and setting the location counter in a linker script to some value perform the same function. However I am wondering that if I use both the org directive and the…
vjain27
  • 3,514
  • 9
  • 41
  • 60
-1
votes
2 answers

Erasing and writing into flash gives an error while building

I am writing a program in C for NXP freescale kinetis microcontroller KEA128. I modified the linker description file and proceeded to write a simple C program in C. But when I build the project, it gives the following error message…
user8540390
  • 143
  • 1
  • 10
-1
votes
1 answer

Adding a condition to Linker Command File

Can i write a condition in the .lcf ? I want to check if the sum of certain sections is above a certain threshold. if yes i want the linker to show Error/Warning I'm new to the .lcf and i don't know if this is possible or not. Any Advice ? Linker…
-1
votes
1 answer

Linker cannot find existing Static Library File

I have a Eclipse project using C programming language. I have been stuck with a problem related to linker error since two days now. I have checked various forums to find a solution. Tried a lot of the suggestions but could not resolve it. So as a…
Abinash
  • 21
  • 2
-1
votes
1 answer

How to implement OVERLAY in i386 linker via linker scripts

I am trying to link the Overlay example from the GDB reference manual. The example is targeting the d10v processor (not familiar with it) but I would like to demonstrate that the debugger works with overlays by compiling the example for the x86_64…
muman
  • 141
  • 8
-2
votes
1 answer

Difference between Data segment and Heap

could anybody please tell me if Data segment is the same as Heap segment, if not, could you please explain what's the difference between the two, i understand what's the difference between stack and heap, but in some books they evoke data segment as…
camelkos
  • 51
  • 5
1 2 3
30
31