linker-scripts Questions

1

I have created some special sections in a linked file and I want them to be in separated segments to have different page permissions. In linker script, PHDRS command can specify segments in linked...
Anklet asked 15/3, 2017 at 11:49

1

I'd like to create a program with a special section at the end of Virtual Memory. So I wanted to do a linker script something like this: /* ... */ .section_x 0xffff0000 : { _start_section_x = ....
Bettor asked 16/11, 2017 at 22:27

0

I know I can define a symbol/label in my (GNU binutils ld) linker script simply by assigning an address to the symbol like so: my_symbol = 0xdeadbeef; But, what if I wanted to give that symbol a si...
Pragmatic asked 30/3, 2017 at 0:10

3

Solved

I've read this tutorial I could follow the guide and run the code. but I have questions. 1) Why do we need both load-address and run-time address. As I understand it is because we have put .data ...
Kylix asked 28/12, 2016 at 15:31

2

Solved

I am using the STM32F746NG microcontroller from STMicroelectronics. This device is based on the ARM Cortex-M7 architecture. I invested quite some time in understanding the linkerscript from example...
Graduation asked 10/11, 2016 at 16:14

1

Solved

In GCC, the MEMORY command describes the location and size of blocks of memory in the target. The command must be used this way. MEMORY { name [(attr)] : ORIGIN = origin, LENGTH = len ... } ...
Keelung asked 10/10, 2016 at 12:19

1

Solved

So, I have this assembly file, which I assemble with GNU as and link with GNU ld using a linker script. Linker script (boot.ld): INPUT(boot.o) OUTPUT(boot.out) ENTRY(boot_start) SECTIONS { . = ...
Shimmery asked 6/10, 2016 at 9:53

2

Solved

I am working on an embedded system (Stellaris Launchpad) and writing a simple OS (as a hobby project). The used toolchain is gcc-none-eabi. My next step is to get used to the MPU to allow the kern...
Chevaldefrise asked 3/4, 2015 at 18:40

3

Solved

As a spin-off of a previous question (sbrk function not found when placed in a static library): I'm creating a bare-metal application for the stm32f407 microcontroller, which has an ARM Cortex M4 c...
Arium asked 9/3, 2015 at 18:21

2

Solved

I am trying to link a program with my own start-up file by using the STARTUP directive in a LD script: ... ENTRY(_start) STARTUP(my_crt1.o) ... GCC driver is used to link the program (not to bot...
Lissner asked 19/5, 2013 at 21:47

1

Solved

In the man page of nm. It says “A” The symbol's value is absolute, and will not be changed by further linking. However, I don't know what that means. How can I define a variable or something e...
Digestible asked 24/10, 2015 at 22:33

1

My question is very simple. Is there a way to add comments to a linker script? Like for example in a makefile: # Comment
Outsert asked 11/6, 2015 at 19:6

3

Solved

I want to get the address of the end of my program and check at compilation/linker time if I have enough space, after the code, to place some random data in execution time. But as the symbols prov...
Ezana asked 30/5, 2013 at 11:52

2

There are really two questions that revolve around the use of --add-section. The simple one is in the title. Based on my reading, I haven't been able to figure out how one could execute --add-secti...
Pavyer asked 24/7, 2013 at 0:47

1

I have some simple declarations of a global instances with non-empty constructors. These constructors are called during startup automatically. I am cross-compiling C++ on Linux to different microco...
Hildredhildreth asked 17/2, 2015 at 14:47

3

Solved

I've just started learning some ARM programming and I've got stuck in a slightly annoying problem. The toolchain I'm using to compile my sources is Sourcery CodeBench Lite 2013.05-23 (can be found ...
Fleur asked 19/10, 2013 at 20:15

3

Solved

I have two linker scripts: common.ld which defines some symbols, and app.ld which positions the sections, using these defines. If I just cat the two files together, and feed that to ld (via gcc), ...
Paff asked 8/10, 2013 at 15:35

1

I am getting a linking error: dangerous relocation: l32r: Literal placed after use: I am still trying to debug. However, I want to better understand this error. I understand what relocation is, b...
Hammel asked 23/10, 2013 at 4:29

2

Solved

Problem My problem is that when I use the following script which is intended to place the Code into RAM the relocate section gets filled with bogus data. My question is: Why is the _srelocate s...
Dygert asked 11/7, 2013 at 23:9

1

For doing Unit Testing of an embedded project on the host, I started to use function pointers to be able to change between the 'real' implementation of a function and a mock at runtime. So, my func...
Shawanda asked 23/6, 2014 at 9:46

2

Solved

I'm trying to debug a linker problem that I have, when writing a kernel. The issue is that I have a variable SCAN_CODE_MAPPING that I'm not able to use -- it appears to be empty or something. I ca...
Sansculotte asked 11/12, 2013 at 18:9

1

I'm working on a project for an embedded system, using an ARM M0. A ROM application has to be created, whose sole purpose is to store stuff in rom, and initialize the data and bss sections wheneve...
Redman asked 30/9, 2013 at 14:12

2

Solved

I am writing the boot-up code for an ARM CPU. There is no internal RAM, but there is 1GB of DDRAM connected to the CPU, which is not directly accessible before initialisation. The code is stored in...
Hematuria asked 7/4, 2013 at 22:23

1

Solved

I'm trying to change the start location of my stack using a linker script on x86_64. I was able to move my executable start address using this: PROVIDE (__executable_start = SEGMENT_START("text-s...
Judgemade asked 31/12, 2012 at 20:17

1

When linking libraries, -rpath is used to pass the address of dynamic libraries to ld. My question is if I set the address in LD_LIBRARY_PATH, do I still need -rpath flag in my linking process?
Crossstaff asked 29/11, 2012 at 1:2

© 2022 - 2024 — McMap. All rights reserved.