Questions tagged [lld]

lld is the linker from LLVM.

lld is the linker from the LLVM project. It is modular, fast and compatible with existing linker options.

109 questions
1
vote
0 answers

Boost Fiber on OS X

I'm trying to get boost fiber up and running on os x, and I'm having quite a few issues. First, fiber won't compile with Apple clang because of the use of thread_local which Apple does not support (according to what I found online, they think they…
pat
  • 763
  • 4
  • 12
1
vote
1 answer

LLVM missing linker and can't compile the lld (llvm linker)

I want to build a compiler to a new target and I choose llvm. As far as I understand, I can use the clang project as a front end and llvm as a back end. I can get .o files out of the llc (part of the llvm). now I need to link them all into…
yehudahs
  • 2,488
  • 8
  • 34
  • 54
0
votes
0 answers

strange rust-lld error in no_std environment

I'm trying to use rust-lld to link a custom kernel written in Rust and I'm getting this weird error: error: linking with `rust-lld` failed: exit status: 1 | = note: LC_ALL="C"…
kamkow1
  • 467
  • 2
  • 8
0
votes
0 answers

How can I place my variable into a specific section using lld or mold linker?

A.ld SECTIONS { .rel.rodata.func_reg : { PROVIDE(func_reg_start = .); *(.func_reg.aaa.*) PROVIDE(func_reg_end = .); ... } } INSERT AFTER .text; A.hpp typedef bool (*func_type)(); #define ADD_FUNC(idx, func)…
JSK
  • 45
  • 5
0
votes
1 answer

Clang with Address Sanitizer on Windows fails at link time

I have the following setup: clang: clang version 16.0.6 Target: x86_64-pc-windows-msvc Thread model: posix windows (not sure if relevant): Windows 10 Version 22H2 (OS Build 19045.3086) CMakeLists.txt: cmake_minimum_required(VERSION…
haidahaida
  • 229
  • 3
  • 8
0
votes
1 answer

Why is lld saying unknown file type?

Could anyone help me on why ld.lld is telling me: clang -ffreestanding -mno-red-zone -m32 -c kernel/main.cpp -o kernel.o ld.lld -m elf_i386 -T kernel/linker.ld -o kernel.bin kernel.o ld.lld: error: kernel.o: unknown file type make: *** [Makefile:13:…
Pigioty
  • 11
  • 6
0
votes
0 answers

How to implement -z separate-code with linker script?

The system ld.bfd linker supports options such as -z separate-code and -z noseparate-code. With -z separate-code, there are 4 LOAD segments, and its layout is R RE R RW. With -z noseparate-code, there are 2 LOAD segments, and its layout is RE…
Billy
  • 701
  • 1
  • 8
  • 26
0
votes
0 answers

surviving symbols in GC-section

i am writing proposal for GSOC, in project i have to preserve surviving symbol during "-print-gc-sections", so need to know what is surviving symbols?
0
votes
0 answers

Faster incremental builds on Windows with LLD, not anymore?

I'm on Windows 10 x64 with: rustup 1.25.1 (bb60b1e89 2022-07-12) rustc 1.66.1 (90743e729 2023-01-10) MSVC v143 installed with Visual Studio Installer from Microsoft. If I open a Rust project and change a simple char in code (eg: a variable value…
Fred Hors
  • 3,258
  • 3
  • 25
  • 71
0
votes
1 answer

Is it possible to tell a linker to use libraries with some duplicated symbols as if the symbols were actually different?

We are distributing four different static libraries to customers: Library A: contains some common functions but also some embedded common libraries from linux which are not intended to be exposed to the customer, but to other of our libraries (so…
Anna
  • 23
  • 4
0
votes
0 answers

Missing sources for clang compilation with gcc-arm-none-eabi toolchain

I do clang --target=arm-unknown-none-eabi compilation and lld linking with the toolchain (STL headers and libraries)…
ge45mue
  • 677
  • 8
  • 23
0
votes
0 answers

lld-link is showing error (undefined symbol : EFI_LOADED_IMAGE_PROTOCOL_GUID)

I am making UEFI Bootloader (UEFI Application), by last version of clang and linked by lld-link. i need to use EFI_LOADED_IMAGE_PROTOCOL for load file, I used EFI_LOADED_IMAGE_PROTOCOL_GUID. but lld-link is showing undefined symbol :…
A Dev.
  • 3
  • 2
0
votes
1 answer

Error in Simu5g and Veins5.2 make on the Omnetpp IDE

I am getting the following error in Simu5g make on Terminal. libsimu5g.so file is not build at the end. Creating shared library: ../out/clang-release/src/libsimu5g.so ld.lld: error: unable to find library -lINET clang: error: linker command failed…
0
votes
2 answers

How to handle .debug_info relocation R_X86_64_32 out of range: 4295935474 is not in [0, 429496729]

I am building a cpp project, but the link fails, because the .debug_info segment is too large, exceeding 2^32-1. Is there a tool to locate which part of the code has a larger .debug_info segment, or is there a way to remove this limitation? compiler…
zcfh
  • 101
  • 1
  • 9
0
votes
1 answer

ERROR:relocation R_X86_64_PC32 against symbol `_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC

I am getting a make error while running omnetpp. I have turned the clang and the lld off. The exact error is: Creating shared library: /home/ash/omnetpp-master/out/gcc-release/src/sim/liboppsim.so /usr/bin/ld:…