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
1 answer

How can I strip symbols from my executable when using Clang and the LLVM ELF ld.LLD linker?

I am building with Clang 9.0.0 and linking with the ld.lld linker clang++.exe -Wall -fexceptions -m64 -O3 -Xclang -flto-visibility-public-std -std=c++2a -flto=thin -c I:\Cpp\hello_boost\hello_codeblocks_world\hello_codeblocks_world.cpp -o…
1
vote
2 answers

Is there a way to automatically set an environment variable when an ELF binary begins execution?

I have a binary executable mytest, created with Clang and bfd/lld, and in order for it to work correctly I have to pass the environment variable ASAN_OPTIONS="use_sigaltstack=1" to it, but I want to avoid having to manually type that in every time I…
newmacuser
  • 51
  • 4
1
vote
2 answers

LLD and the Linker Scripts

I am trying to send the linker scripts for one of the simple c program . I tried on both on Ubuntu and Windows. On Ubuntu After some research I found out that it was taking GNU-ld ,so With clang command line option -fuse-ld=lld ,So now I linked…
Jon marsh
  • 279
  • 7
  • 12
1
vote
1 answer

What is a "Port" in linker?

I'm reading the documentations of LLD (LLVM linker) and it mentioned "ports". Eg., The ELF port is the one that will be described in this document. The PE/COFF port is complete, including Windows debug info (PDB) support. The WebAssembly port…
Curious Learner
  • 343
  • 2
  • 9
1
vote
1 answer

Is it possible to use "NOCROSSREFS_TO" in linker script for Clang's ld.lld?

I need to compile project with custom linker script. This project is successfully compiled by gcc. Build fails when I use clang with ld.lld linker. It fails on linker stage due to the use of "NOCROSSREFS_TO" command, which is used in linker…
lol lol
  • 319
  • 3
  • 18
1
vote
2 answers

Specifying custom linker executable to g++

I would like to try the LLVM linker (lld) on our project. We use gcc 6, so apparently the -fuse-ld=lld flag is not available yet. I don't control the ld executable used by default, so I can't replace it with a symlink. Are there any other…
Innot Kauker
  • 1,333
  • 1
  • 18
  • 30
1
vote
1 answer

Zabbix discovery rules - how to fill in key item

I'm new in Zabbix and I'm having a problem. I run a script in power shell and get this sample data: { "data":[ { "{#BZSENDPORTNAME}":"Com_Onshore_SDE", …
1
vote
1 answer

Unable to run windows binary compiled with clang/lld/mingw

I have downloaded and installed clang on windows 10 from http://releases.llvm.org/download.html and mingw from https://sourceforge.net/projects/mingw-w64/ I am trying to compile a very basic C program using clang/lld/mingw: int main(int argc, char*…
1
vote
0 answers

LLD error on -O2 Function Scoped Static TLS cannot be used against symbol recompile with -fPIC

I am using LLVM's LLD8 to replace GNU-LD to improve link speed. But when I make .so file, there is a strange error in the release mode. After streamlining, I reproduced this problem with a simple example test.h: #ifndef TEST_H #define TEST_H inline…
CChip
  • 11
  • 3
1
vote
1 answer

Clang Windows LD Set Library Path Not Work?

Compiling on windows with 6.0.0 or 6.0.1 ld.lld can't find the library in specified path. This does not work: ld.lld Source.o -o Executable.exe -L"C:/Users/Username/Documents/" libcode.a But this does: ld.lld Source.o -o Executable.exe…
SedatedSnail
  • 113
  • 7
1
vote
0 answers

Git Submodules With Common Clone Directories

I'm working on a project that uses LLVM and LLD, which are stored in separate remote repositories (https://git.llvm.org/git/llvm, https://git.llvm.org/git/lld). To build LLD, it must be cloned inside of LLVM, where the LLVM build system will detect…
Brent
  • 4,153
  • 4
  • 30
  • 63
1
vote
1 answer

Section address ignored when using MEMORY

I have a linker script: SECTIONS { .text 0x42000: { *(.text*) } aligned_dot = ALIGN(0x10 * 1024); .data aligned_dot : { *(.data*) } } If I link a (very simple) file using this it gives what I would expect: Sections: Idx…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
1
vote
1 answer

objdump showing wrong start and end address for functions

For testing purposes, I modified the PLT stub that is generated by the llvm linker, lld. The stub before was: 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmpq *got(%rip) 0x68, 0x00, 0x00, 0x00, 0x00, // pushq 0xe9, 0x00, 0x00,…
Banex
  • 2,890
  • 3
  • 28
  • 38
1
vote
2 answers

Higher line numbers are unresolved as breakpoints when debugging using lldb

I am trying to set breakpoints in a MIPS32r6 program that computes the Mandelbrot Set in Brainfsck. The program itself is written in C++, compiled with Clang, and I am debugging with LLDB. The issue that I am having is that when in LLDB, I can set…
ameisen
  • 33
  • 1
  • 7
1
vote
4 answers

LLVM compilation process and LLD

I've been trying to make the switch to LLVM, since I'd like to get more into the whole 'software-dev' scene, and it seems like right now, LLVM is the future. I built LLVM/Clang/LLD/compiler-rt/libcxx from source several times now, both with GNU/GCC…
PyroAVR
  • 719
  • 1
  • 8
  • 19