Skip to main content

Questions tagged [linker]

The linker is part of the toolchain for producing executables from source code written in compiled programming languages. It takes compiled object code in multiple files and produces a single, "linked", executable file from them.

0 votes
0 answers
3 views

How to put risc-v assembly code in a certain memory section

Hi I was trying to figure out how to put the following risc-v code : .globl _start .extern main .section .text _start: # Set up for c la sp, _stack_top jal ra, main end: j end Into the ...
Jip Helsen's user avatar
  • 1,246
0 votes
0 answers
11 views

Embedded Firmware crashes while starting up probably cause memory is not available

I have a lot say and the fact that I am very very new to linker scripts. We have an embedded firmware application that was working fine until ages. We added a lot of 3rd parties libraries and still ...
Programmer's user avatar
  • 8,549
0 votes
0 answers
14 views

LLVM linker does not work on MacOS while trying to develop on-chain Solana app (C++)

this is the error i get: ./account_logger.so () dyld[61282]: Library not loaded: @rpath/libLLVM.dylib Referenced from: <A9E4BE2A-BF8D-3956-BCA9-E3BC5A6C9F9C> /Users/myusername/.local/share/...
Tiron Raul's user avatar
1 vote
2 answers
67 views

Does including a header obviate the need for extern declarations?

On page 33 of K&R (The C Programming Language, 2e), they remark that If the program is in several source files, and a variable is defined in file1 and used in file2 and file3, then extern ...
EE18's user avatar
  • 147
0 votes
0 answers
52 views

C++: ODR and extern "C" on MSVC linker

I'm testing out how the Windows link.exe program reacts when presented with ODR violations. My intention is that the linker will fail when it notices that my program has two definitions of the same ...
Martin's user avatar
  • 1,005
0 votes
0 answers
8 views

Understanding GCC Compilation: Preprocessing vs Linking with Libraries

I have a question regarding compilation with GCC. I have a slight confusion that I believe I've figured out but would like confirmation on. In the first compilation step, preprocessing (cpp) organizes ...
DLR's user avatar
  • 1
0 votes
1 answer
18 views

Strange linking problem when `dlopen` a library

I have some strange linking problem with a library which is dynamically loaded using dlopen. Precisely, I have a code that loads a library libmine.so (which is part of the code) that depends on Intel ...
Dmitry Kabanov's user avatar
0 votes
1 answer
16 views

STM32CubeIDE: How to exclude memory sections in linker script from output file

In my cube project, I need to generate a bin file as the output. The output bin file is over 2GB because it includes a RAM section (0x30000000) in the output as well as the required flash section (...
ethan's user avatar
  • 25
1 vote
1 answer
65 views

Setting Preprocessor Definitions in a referenced project

I would like to conditionally export symbols to be used in a Google Test project in Visual Studio 2019. I am trying to set a preprocessor definition called UNIT_TESTS, but only when the unit test ...
JJenkins's user avatar
0 votes
0 answers
11 views

MSVC Linker: /NODEFAULTLIB and /DEFAULTLIB option

I noticed that the MSVC linker from Microsoft has among many other options these two options: /NODEFAULTLIB and /DEFAULTLIB. The documentation says: By default, /NODEFAULTLIB removes all default ...
Sam's user avatar
  • 1,582
-1 votes
0 answers
24 views

How to run an LC-3 Assembly program

I am creating an LC-3 Assembly program. I have managed to assemble it into an obj file. I'm not sure what linker to use / what arguments to use from here. Any help would be much appreciated. I tried ...
NonzeroCornet34's user avatar
0 votes
0 answers
16 views

How does the dynamic linker resolve symbols at run time?

I'm trying to understand how the dynamic linker resolves symbols at run time. I read chunks (but not all) of David Beazley et. al's The Inside Story on Shared Libraries and Dynamic Loading, but I don'...
user2374991's user avatar
0 votes
0 answers
19 views

Build failure on Msys2/ming64 environment by clang with clang64/bin PATH

On Msys2/ming64 environment, tried to build stockfish by use of clang/llvm, as PATH: clang64/bin precedes over mingw64/bin use flags: CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++17 -pedantic ...
user17227456's user avatar
  • 1,287
-2 votes
0 answers
40 views

cmake change order of option linker [duplicate]

My program use libusb-1.0. If I run compile command: g++ async.c -lusb-1.0 -o async all OK If I run compile command: g++ -lusb-1.0 async.c -o async get error /usr/bin/ld: /tmp/ccNWWieW.o: in function `...
Роман Кравченко's user avatar
1 vote
0 answers
32 views

Link function calls against reverse engineered binary

I created an windows x86 .exe file that I reverse engineer. Imagine I only have the .exe file and I reverse engineered some functions. The goal is to create a dll that links with this .exe so the dll ...
Edward Gynt's user avatar

15 30 50 per page
1
2 3 4 5
945