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
0
votes
0 answers

How to make clang lld output a binary file?

I'm doing a bit of osdev on my mobile (my PC broke XD) and I'm using termux In this app there isn't the binutils and gcc i686/x86_64 toolchanins, so the only c compiler that can output i686 stuff is clang & lld I already managed to make compile…
Cyao
  • 727
  • 4
  • 18
0
votes
0 answers

linking against different libc++ for clang14 on macOS 10.13

edit: My question is not related to Link errors using members in C++17 at all! -lstdc++fs is not available on clang14 for macOS 10.13 edit2: Latest Xcode for macOS 10.13 is clang10, that is another reason for using clang14 from llvm.…
Serilena
  • 66
  • 8
0
votes
0 answers

how to skip incompatible architecture when linking with lld

I have a lib that provides both libxxx_x86_64.a and libxxx_arm64.a. When linking using ld x86_64.a is skipped, ld: warning: ignoring file _pod_work_dir/Pods/____/libs/______x86_64.a, building for macOS-arm64 but attempting to link with file built…
isudfv
  • 179
  • 1
  • 9
0
votes
1 answer

Zabbix discovery permission denied from server

Im using zabbix 6.0.4 And have created a custom python script that return this json: {"data": [{"{#STATUS}": "UP", "{#NAME}": "server1"}, {"{#STATUS}": "UP", "{#NAME}": "server2"}, {"{#STATUS}": "UP", "{#NAME}":…
gsr
  • 169
  • 2
  • 19
0
votes
1 answer

Darwin `ld` stubbornly won't find symbol that's defined in object file, while `lld` does

When using macOS's built in ld, I get the following error: ld -arch x86_64 -platform_version macos 11.0 12.2.1 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -lSystem -lc++ -o…
blashyrk
  • 107
  • 1
  • 6
0
votes
0 answers

clang failed to invoke lld correctly

I prepare two very simple c files, main.c and test.c, and use the below command to compile them: clang --target=aarch64 -c main.c clang --target=aarch64 -c test.c But when I use the command clang --target=aarch64 -fuse-ld=lld -v main.o test.o, it…
Simon Zhu
  • 7
  • 2
0
votes
2 answers

Which design pattern to use for pre-process process and post-process task

I am working on one migration engine to migrate data from older system to newer system. it is divided into 3 steps. first getting the data from older tables. prepare the request body to insert into new tables via APIs post processing steps. Which…
0
votes
1 answer

LLVM's lld don't know --dll-search-prefix=cyg

The good news, I was able to compile and install Clang and lld from branch llvmorg-12.0.1 under Windows / Cygwin. It compiles my code fine but linker says: lld: error: unknown argument: --dll-search-prefix=cyg I am wondering because of I thought…
MKFein
  • 79
  • 1
  • 7
0
votes
1 answer

LLD undefined symbol when attempting to link glfw

I've been trying to get an LLVM toolchain setup on my Windows 10 machine. I gave up on building from source and have the MSYS2 mingw-w64-clang-x86_64-toolchain package installed (clang version 13.0.0). I can compile simple code that uses the C++…
xerict
  • 21
  • 1
  • 1
  • 4
0
votes
1 answer

LLD link failure ( expected, but got ) at KEEP(*.init_array)

I am trying to build firmware for Cortex-M0 with clang. The gcc build works of course fine. The build fails during linking ld.lld: error: baremetal.ld:72: ( expected, but got ) >>> KEEP(*.init_array) >>> ^ clang-12: error:…
filo
  • 223
  • 3
  • 14
0
votes
0 answers

Why are linkers not used programmatically in compilers?

I am trying to build a small compiler with LLVM in order to understand how this whole ecosystem works. I have gotten as far as generating object files. Now, I am a bit confused about the linking part. From my understanding, clang finds the default…
rahul valluri
  • 15
  • 1
  • 4
0
votes
1 answer

Which part of GCC is still involved when building with Clang++ and LLD?

I built a very simple program using Clang++/LLD: clang++ -fuse-ld=lld -o test test.cpp I than ran readelf to confirm that LLD was indeed used as the linker, as mentioned on https://releases.llvm.org/11.0.0/tools/lld/docs/index.html: $ readelf…
Roel Schroeven
  • 1,778
  • 11
  • 12
0
votes
1 answer

Why is '.shstrtab' section mandatory?

I'm compiling a static executable like this: ld.lld out/main.o -o out/sm -Tstatic.ld -static strip --strip-all out/sm This is the linker script I'm using: ENTRY(_start) SECTIONS { . = 0x100e8; .all : { *(.bss*) *(.text*) …
fctorial
  • 765
  • 1
  • 6
  • 11
0
votes
1 answer

Building lld on Apple Silicon

I am try to build lld from LLVM version 11 (I can't use any later or master version of LLVM for the time-being) and am currently configuring with cmake ~/Downloads/lld-11.0.0.src/ -DCMAKE_INSTALL_PREFIX=$HOME/bin/llvm…
SamTebbs33
  • 5,507
  • 3
  • 22
  • 44
0
votes
1 answer

ld and lld use only paths I input

I am trying to cross compile for my raspberry pi, unfortunately the pi has an older version of libstdc++ than my build machine and when I try to run my executable it says "./: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version…
Sam
  • 289
  • 1
  • 10