Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
137 views

I've followed the book OS01 by Tuhdo, kind of made a simple bootloader, that loads the kernel. Then I tried to add some code to set up GDT, but I've witnessed unusual behavior in gdb. Here I stopped ...
nhanphamdev's user avatar
2 votes
1 answer
110 views

GNU documentation is really poor and is worded in a way that seem to imply that you can only assign version only to symbols that are listed explicitly either under global: or local:, but those are ...
Dan M.'s user avatar
  • 4,074
1 vote
0 answers
81 views

I understand that I can give a function a static linker symbol name like this: // The linker symbol produced for this function will be named // "foo_bar", not "asdf" or some ...
Richard Hansen's user avatar
0 votes
0 answers
36 views

Target Processor: ARM R5F IDE: Texas Instruments Code Composer Version 12.0 COMPILER/LINKER: TI ARM Clang 3.2.2 OS: Windows 11 I am writing my own C runtime startup code that will run on an R5F ...
user4574's user avatar
  • 416
1 vote
1 answer
118 views

There is a HAL library of functions for working with flash memory. I want all the functions of this library to work from RAM. How can I do this correctly, without writing _attribute_((section("....
mml's user avatar
  • 31
0 votes
0 answers
59 views

I did not find any related questions here on SO hence the new post. I have tried to find out how to resolve my problem by reading the ld man page and asked both on reddit and a LLM. I have a linker ...
peterparker's user avatar
1 vote
1 answer
156 views

I have a section in my linker script which needs to contain 2 things: A variable length byte-array (used for heap) A global variable called foo. This can be done like this: MEMORY { APPL_STATE (...
Allan's user avatar
  • 4,790
1 vote
1 answer
234 views

I am trying to build a static position-independent executable with gcc provided option -static-pie. The target is bare-metal risc-v, so no OS, no dynamic loader. I have a linker script similar to ...
Eugene Sh.'s user avatar
  • 18.7k
1 vote
1 answer
75 views

I have a linker script which is used for ELF generation, which is then used to create a S19 file. Since in S19, S0 is a header record which stores metadata of the firmware. I want to store information ...
Rugwesh's user avatar
  • 11
0 votes
1 answer
159 views

I want to put my .text section at 0x80200000, but despite my every attempt, .rodata refuses to move out of my way, leaving .rodata at 0x80200000 instead: Sections: Idx Name Size VMA ...
CocytusDEDI's user avatar
0 votes
0 answers
128 views

I'm currently trying to recreate the blinky example using low-level C++ using vscode for the STM32F446RE Nucleo-64 board. I took the linkerscript and startup code from dwelch67's stm32 sample code and ...
SneakyTurtle's user avatar
3 votes
1 answer
94 views

I am working on a project that contains a firmware update failure feature that : notifies user/host that firmware update failed whenever the device gets unplugged in the middle of a firmware update ...
Tom MacDonald's user avatar
1 vote
1 answer
277 views

I have allocated a memory section my_data in the linker file to store some shared variables. However, I noticed that after startup, I see some (???) values when I take a memory dump. Below is my ...
user2986042's user avatar
  • 1,300
1 vote
0 answers
24 views

gnu .ld linker script -- I have added a MEMORY definition to hold a checksum: _CRC_Value = 0x12345678; MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 80K FLASH (rx) : ORIGIN = ...
Hunter Ritchie's user avatar
1 vote
0 answers
92 views

boot.s .code16 .text .global start start: jmp start boot.ld ENTRY(start) SECTIONS { . = 0x00007C00; /* Set the location counter to 0x7C00 */ .text : { *(.text) } ...
Korsarq's user avatar
  • 805
0 votes
1 answer
400 views

After the .LD file(linker file) of an embedded bare metal specifies that FLASH is not writable, for example: MEMORY { { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K RAM (rwx) : ORIGIN = ...
james lebron's user avatar
1 vote
1 answer
201 views

Per the C standard section 7.1.3 Reserved identifiers All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces....
Eugene Sh.'s user avatar
  • 18.7k
0 votes
0 answers
108 views

`Hello everyone, I'm new in that domain (linker script and memory section). I have an array that I want to declare in a section of my address space of my processor (neorv32). I do this for various ...
etienne lattion's user avatar
5 votes
1 answer
319 views

in a software project of mine, on linux, I need to create a special section that needs to be populated with 40 bytes large structures. Then I would like to treat this section as an array. For that I ...
mastupristi's user avatar
  • 1,598
3 votes
1 answer
217 views

I'm working on an embedded project using an ARM Cortex-M4 processor (specifically, an STM32F4 microcontroller) and I've encountered a peculiar issue related to memory sections defined in my linker ...
Giackkk's user avatar
  • 121
0 votes
0 answers
98 views

i want to generate hex file , that contains rodata as aligned 4 bytes . But my riscv compiler generate hex file ,that contains rodata as aligned 2 bytes. i have tried many methods 1.i have already ...
Raja Gopal's user avatar
0 votes
0 answers
62 views

I'm trying to re-create MSVC's behavior of the /export:myfunction=upstreamlib.myfunction linker flag in gcc/llvm (specifically Rust but I think this is a linker question rather than rust) which ...
dzervas's user avatar
  • 257
-1 votes
1 answer
69 views

When a language gets processed into displaying its output, specifically for compiled languages, their code is compiled by a compiler, assembled by an assembler and linked by a linker to create the ...
Bax STAR's user avatar
2 votes
0 answers
161 views

I'm working with an STM32H7 microcontroller and encountered a Hard Fault during the startup sequence while copying data from Flash to RAM (specifically to ITCM and DTCM sections). This issue arises ...
pmundt's user avatar
  • 127
0 votes
1 answer
283 views

I develop for the STM32 environment (same IDE), and I have to change the original Linker Script. I would like to store a struct in the exact memory address. If I create a new memory item (in the ...
Peti634's user avatar
0 votes
1 answer
79 views

I have some C++ code that is dlopening the "libm.so" library: dlopen("libm.so", RTLD_GLOBAL | RTLD_NOW); Under RHEL7, this was a sym-link: libm.so -> libm.so.6 Under RHEL9, ...
Dan's user avatar
  • 35.8k
0 votes
1 answer
390 views

We had the application up and running fine on NXP S32K312 target when the program flash address was 0x00400000. When we needed to change the program flash address to start at 0x00440000 in the linker ...
Mohamed NASSAR's user avatar
2 votes
1 answer
108 views

i have a simple 32 bit kernel which gets loaded succesfully by a bootloader shown below [org 0x7c00] ; we can also alter the data segment register (ds) accordingly: ; mov ds, 0x7c0 (it will be 0x7c00 ...
alireza's user avatar
  • 55
1 vote
1 answer
745 views

In the last months I have implemented ad RV32I CPU on an FPGA. Until now I just tested it using some assembly code. This week I decided to try out a simple test program in C on it. The source code is ...
lazerbeam's user avatar
1 vote
0 answers
38 views

I'm using linker .ld file to create a section called SECVAR .SECVAR : { *(.SECVAR ) } using the below command in my .c file to create a variable called Dummy under section: unsigned short ...
Priya's user avatar
  • 21
1 vote
0 answers
252 views

I am trying to compile a c program for baremetal riscv core. What I am trying to do is generate random values put them in a dynamic array and send them through ROCC instructions. Here is the c program:...
engineer1155's user avatar
1 vote
2 answers
162 views

I'm new to embedded development and I'm currently trying to develop a project for a custom board based on TI's CC2538SF53 microcontroller. I've based the code on some tutorials I've seen online and on ...
Lucas Yotsui's user avatar
1 vote
1 answer
91 views

Let's say I have a section in a linker script that describes some really fast ram: .fastram __fastram_start : AT (__fastram_lma) { __fastram_start__ = ABSOLUTE(.) ; *(.fastram....
user678253's user avatar
3 votes
2 answers
813 views

For example I want to place a special data in 0x100000000, 0x100100000, 0x100200000, ... and for this I want to do in a header file, #define DATA_START 0x100000000 #define DATA_GAP 0x100000 #define ...
Chan Kim's user avatar
  • 6,159
0 votes
0 answers
56 views

I am writing an OS in assembly and cpp. I encountered a problem regarding char pointers in cpp: for example, the following code: #define VIDEO_MEMORY 0xB8000 #define COLUMNS 80 #define ROWS 25 #...
Ynon Slutzker's user avatar
1 vote
1 answer
599 views

How does the linker assign anything to ITCMRAM on STM32 H7 series Arm Cortex M MCU? The linker script provided by ST has a section defining ITCMRAM: /* Memories definition */ MEMORY { ITCMRAM (...
SRobertJames's user avatar
  • 9,367
1 vote
0 answers
316 views

I have a GNU linker script for my firmware with the following section defined: .endc : { KEEP(*(.endc)); . = ALIGN(4); _end_code_mark = .; } >FLASH This is the last time I'm ...
kokopelli's user avatar
  • 372
1 vote
1 answer
272 views

As in the title, can you use a linker script with Apple ld64 linker? I mean an option similar to -T of GNU ld.
mrn's user avatar
  • 1,093
0 votes
1 answer
166 views

I would like to build an executable with a specific linker script file (my.linkcmds). And when I update my linker script, I would like to trigger the linker part of the add_executable(). I use the ...
STib's user avatar
  • 1
9 votes
1 answer
3k views

Search engine results for gnu linker script command language return pretty old (pre 1998) documentation. So where can one find the documentation for gnu ld's script command language? What did I try? ...
codepoet's user avatar
  • 242
0 votes
2 answers
596 views

I am learning how bare metal programming on ARM works and I am having difficulties understanding how the addresses defined in the linker script are used. This is my linker script: ENTRY(ResetHandler) ...
Korsarq's user avatar
  • 805
0 votes
0 answers
122 views

I am working on a bootloader for a PIC24HJ series MCU. While going through the linker script I noticed something, tried a google search, searched documentation, GCC linker documentation, I'm out of ...
nurchi's user avatar
  • 798
1 vote
1 answer
546 views

I have an STM32 CubeIDE project. I want to place a static library in an absolute memory address in the upper part of the internal flash while the application code will be placed at the beginning of ...
Eyal Goltzman's user avatar
0 votes
1 answer
273 views

I was trying to understand command OUTPUT_FORMAT() in GCC linker, they didn't mention what are the possible values for the arguments like for example : OUTPUT_FORMAT("elf32-littlearm", "...
abdo Salm's user avatar
  • 1,913
0 votes
0 answers
122 views

A.ld SECTIONS { .rel.rodata.func_reg : { PROVIDE(func_reg_start = .); *(.func_reg.aaa.*) PROVIDE(func_reg_end = .); ... } } INSERT AFTER .text; A.hpp typedef ...
JSK's user avatar
  • 45
0 votes
0 answers
174 views

I am using a linker script to compile a program in riscv64 .I need my ram start address to be higher than 32 bits but whenever i try to modify the address in the linker script i get the following ...
Mimis's user avatar
  • 19
1 vote
2 answers
1k views

I am creating a binary for a microprocessor with flash and ram. The regular build process uses a linker script to declare where different sections should go and also exports parameters to the code, ...
felix's user avatar
  • 33
2 votes
0 answers
635 views

I'm working on a big embedded project and I'm facing an issue that I cannot explain with my limited knowledge of linkers. I've managed to recreate the problem in a really simple program. I have a ...
Kalendistrien's user avatar
3 votes
0 answers
375 views

I am newbie to linker script. In my design, RISCV has the code space and data space seperately. The code address is 0~0xFFFF, the data address is 0~0xFFFFFF. Here is my linker scprit: MEMORY { CODE (...
hyperion007's user avatar
1 vote
0 answers
55 views

i am working on a C project using a snake_case syntax for naming my functions. However, a lib i need to uses CamelCase for all of its function names. To avoid doing a long header full of static inline ...
user avatar

1
2 3 4 5
10