Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
1 replies
35 views

I am trying to understand how Low-Level Design (LLD) should be approached in interviews. My confusion is that the design changes depending on the perspective I start with. For example, if I design ...
imssuthar's user avatar
Best practices
0 votes
2 replies
61 views

Am I able to pass the entire User to map the payment Info? Is this a good practice, or is there a better way to do it. public class User { private Long userID; private String name; //DOC ...
Cola Eater's user avatar
5 votes
0 answers
118 views

This is not to Rust-specific; Libsvtav1 built with GCC is not linkable with lld. I am attempting to link a static build of FFmpeg's Libav* libraries for use in a Rust application. I built FFmpeg and ...
Caturria's user avatar
5 votes
1 answer
173 views

I am cross-compiling a Windows x64 GUI executable on macOS (Apple Silicon) using LLVM clang targeting the MSVC ABI, with CMake + Conan 2. The executable itself compiles and links fine until I add a ...
Pawel Pajor's user avatar
1 vote
0 answers
112 views

I've got a working Rust cross-compile setup on Arch Linux, targeting x86_64-unknown-linux-musl and aarch64-unknown-linux-musl from a x86_64 host. By default, binaries for both targets are fully ...
cyqsimon's user avatar
  • 4,113
0 votes
2 answers
91 views

In a interview, someone asked me this situation. How can you improve this. search with many filter condition design pattern Eg: let say search a gym by it distance, by its pincode, by its name, by its ...
nitesh's user avatar
  • 45
2 votes
0 answers
300 views

$ cat hello.c int main () { return 0; } $ clang -fuse-ld=lld -target ppc64le hello.c -o hello.o ld.lld: error: /tmp/hello-37cf01.o is incompatible with elf64-x86-64 collect2: error: ld ...
isomorphik's user avatar
0 votes
1 answer
92 views

My environment is wsl2 Ubuntu22.04 LTS, compiler is clang-18.1.8, ld is LLD 18.1.8 However, when I compile my program, the ld output: : && /usr/local/bin/clang++ -fPIC -stdlib=libc++ -g -Wall -...
Ustinian's user avatar
  • 121
-1 votes
1 answer
158 views

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

I am trying to develop a library for Mac OS for scientific computation. It works and compiles file on Linux, but for some reason I am getting weird errors on Mac. ld: __DATA_CONST segment missing ...
ipcamit's user avatar
  • 392
0 votes
1 answer
446 views

My problem is, that I want to use lld as dropin linker in my mingw installation. So I've copied the lld.exe as lld.exe, ld.lld.exe and lld-link.exe to my mingw bin directory (only one of them is ...
syberflex's user avatar
  • 1,694
0 votes
0 answers
195 views

Hi there! I am porting a project from an old c++ version to a new one, using the newly went out llvm 18 suite. For this, I would like to enable LTO optimizations, however, due to practical reasons, I ...
Az Kalaak's user avatar
0 votes
0 answers
143 views

I tried to build a project using LLVM that is originally built using GCC, but I met some errors related to LLD when linking. It uses --dll and --add-stdcall-alias to the linker, but LLD can't ...
万顷茫然's user avatar
1 vote
1 answer
232 views

I'm writing a standalone program for a risc-v core that has many writes and reads to two different memory ranges. (One range is for ram, and the other is for peripherals. Maybe there will be more ...
John's user avatar
  • 11
0 votes
1 answer
361 views

On the MSYS2 shell, ld fails to link a simple binary: $ clang++ -iquote /mingw64/include -L /mingw64/lib -lLLVM-16 -x c++ - <<<$'#include "llvm/Support/raw_ostream.h"\nint main() { ...
user541686's user avatar
  • 213k
0 votes
1 answer
75 views

Hi can someone tell me why the below code shows the error, I think this should run fine - from abc import ABC, abstractmethod class DriveStrategy(ABC): @abstractmethod def drive_strategy(self):...
Yash Porwal's user avatar
-2 votes
1 answer
71 views

Currently there are 200 customers and each of them have their own code base which has almost exact same code. The level of differences are as follows There are values in app.config and based on that ...
codingBeast's user avatar
1 vote
2 answers
1k views

I was trying to compile a program in Windows using clang so that I can use cmdline options similar to gcc while statically linking to the UCRT library (ucrt.lib). Besides, I also want to specify the ...
Wilderness Ranger's user avatar
1 vote
0 answers
2k views

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" PATH="...
kamkow1's user avatar
  • 501
0 votes
0 answers
132 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
1 vote
1 answer
1k views

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:...
haidahaida's user avatar
0 votes
1 answer
3k views

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: ...
Pigioty's user avatar
13 votes
1 answer
14k views

I have started on the "zero to performance in rust" book. This discusses using the lld linker instead of the standard rust linker to speed up compile times. However, the book is now about a ...
Pioneer_11's user avatar
  • 1,481
2 votes
1 answer
540 views

I have a problem with the installation of OMNeT++ on Ubuntu. The error occurs during the ./configurecommand and relates to the math library: configure: error: Standard C math library -lm not found. I ...
Angelo Trotta's user avatar
0 votes
0 answers
77 views

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?
sahil patidar's user avatar
0 votes
1 answer
773 views

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 ...
Anna's user avatar
  • 23
1 vote
0 answers
797 views

I'm trying to test clang's -fsanitize=array-bounds compiler flag with some c99 code on Windows but I can't compile due to a linker error. My test code is this: int index = 11; int arr[10] = { 0 }; ...
Jason's user avatar
  • 2,306
1 vote
2 answers
8k views

I'm trying to link two risc-v elf files together with ld.lld, but ld.lld is giving me the following error: ld.lld: error: undefined symbol: __divdi3 I suppose that I need to link my files with some ...
Cyao's user avatar
  • 809
1 vote
2 answers
108 views

The build tool for the language in which our project is written does compilation and linking in parallel, for a number of different binaries and so on. In CI we have a separate thread that looks for ...
jberryman's user avatar
  • 16.7k
0 votes
1 answer
390 views

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 ...
Aishwarya Burte's user avatar
1 vote
1 answer
217 views

Is it possible to add a new target to llvmlite (python library)? For a new hardware (e.g. ASIC), I need to have a new and custom LLVM target. This is not very clear from the documentation. If it is ...
Roy's user avatar
  • 197
0 votes
2 answers
3k views

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 ...
zcfh's user avatar
  • 131
0 votes
1 answer
359 views

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 /...
Aishwarya Burte's user avatar
4 votes
1 answer
5k views

I have successfully built clang and lld from source, and both are now available under my .../llvm-project/build/bin directory. Following lld documentation, I am now trying to pass -fuse-ld=lld command ...
Farzam's user avatar
  • 300
1 vote
0 answers
1k views

edit: My question is not related to Link errors using <filesystem> 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, ...
Serilena's user avatar
4 votes
1 answer
4k views

I've been trying to convert a cpp file to wasm without emscripten recently and I've been running with some errors, for example, when I run these commands: clang++ --target=wasm32 -nostdlib -O3 -o ...
MisterJuanXDLOL's user avatar
0 votes
0 answers
313 views

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 ...
isudfv's user avatar
  • 527
0 votes
1 answer
193 views

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/...
blashyrk's user avatar
  • 107
8 votes
1 answer
5k views

I have a CMake project with several subprojects that create static libraries built with -flto=thin. The project has a lot of tests that are linked against the aforementioned libraries. With LTO it ...
Simone Rondelli's user avatar
1 vote
0 answers
2k views

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 --...
Simon Zhu's user avatar
0 votes
2 answers
1k views

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 ...
Vanshika Sharma's user avatar
2 votes
1 answer
2k views

I've been writing some x64 assembly on linux - exactly what it is is not relevant - and I've come across a strange problem. In my assembly code, I've declared printf as an external label, and call it ...
nekodjin's user avatar
  • 165
0 votes
1 answer
255 views

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-...
MKFein's user avatar
  • 91
0 votes
1 answer
22k views

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)...
xerict's user avatar
  • 21
3 votes
1 answer
374 views

I am trying to link Cortex-M4 firmware with clang + lld. The gcc build works fine. I am using the stock CMSIS linker script with only RAM & ROM size adjusted (bases are the same). Beginning of the ...
filo's user avatar
  • 273
3 votes
2 answers
1k views

I want to parse the lld mapfile. Is there an explanation or documentation? I checked clang documentation and lld documentation but failed to find helpful infomation. Here is an example of my mapfile ...
Heyi Sun's user avatar
0 votes
1 answer
665 views

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(*....
filo's user avatar
  • 273
2 votes
2 answers
2k views

Wanted to follow what it is done in this article: https://surma.dev/things/c-to-webassembly/ but with Rust and write a custom allocator. For that I would need to access __heap_base variable that llvm ...
Federico Rodríguez's user avatar
1 vote
0 answers
645 views

is there an environment variable I can passs to cmake that will make clang use lld and not ld? I want something that I can use with CC and CXX and will accomplish the same thing as fuse-ld=lld.
Edward's user avatar
  • 557
3 votes
0 answers
2k views

Helllo, On my WSL2 ubuntu 20.04 system, when I use the following command to invoke ld.lld, everything is OK: clang -fuse-ld=/usr/local/bin/ld.lld .... But when the option "--target=aarch64" ...
simon's user avatar
  • 43