linker

What is the gold linker?

What is the gold linker? Has anyone used the gold linker before? To link a fairly large project, I had to use this as opposed to the GNU ld, which threw up a few errors and failed to link. How is the gold linker able to link large projects where ld fails? Is there some …

Total answers: 4

Embedding binary data into an executable using LLVM tools

Embedding binary data into an executable using LLVM tools In the past I have embedded resource files (images) into programs by first converting them to .o files using the GNU linker. For example: ld -r -b binary -o file.o file.svg Starting with FreeBSD 12, the default linker has changed from GNU’s to LLVM’s. Although the …

Total answers: 4

Symbol table in the .data section of ELF

Symbol table in the .data section of ELF I’m trying to understand how does symbol tables relate to the .data section in ELF. First some assumptions that I’m using as ground to start with. A symbol is a human readable (or “as written in the source file”) representation of a function or a variable that …

Total answers: 1

Difference between 'ld' and 'ld.so'?

Difference between 'ld' and 'ld.so'? While both are called “linker” and are used to link binaries, I can’t really figure out how they differ from each other. Can anyone tell me their differences? Asked By: iBug || Source Without getting too technical: Both are “linkers”, i.e. a tool that combines/loads a piece of compiled code …

Total answers: 1

ldd does not find path, How to add

ldd does not find path, How to add I know this question isn’t very new but it seems as if I didn’t be able to fix my problem on myself. ldd generate the following output u123@PC-Ubuntu:~$ ldd /home/u123/Programme/TestPr/Debug/TestPr linux-vdso.so.1 => (0x00007ffcb6d99000) libcsfml-window.so.2.2 => not found libcsfml-graphics.so.2.2 => not found libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcebb2ed000) /lib64/ld-linux-x86-64.so.2 (0x0000560c48984000) …

Total answers: 3

How to change the paths to shared libraries (.so files) for a single terminal instance

How to change the paths to shared libraries (.so files) for a single terminal instance I want to remove some of the paths the linker uses to find .so libraries for testing purposes. I have found a way to add library paths: export LD_LIBRARY_PATH=”$LD_LIBRARY_PATH:/path/to/library” Are there a variable similar to LD_LIBRARY_PATH that I can use …

Total answers: 1

What are the alternatives to GNU ld?

What are the alternatives to GNU ld? I was curious if it’s possible to build Linux kernel without GNU toolchain (gcc+autotools). I found out that it is possible: after applying patches from llvm.linuxfoundation.org, it was possible to build Linux kernel with clang. GNU linker was used. The alternative to ld is gold which is also …

Total answers: 2

Is there a way to check whether a .so has been compiled with -Bsymbolic-functions flag?

Is there a way to check whether a .so has been compiled with -Bsymbolic-functions flag? My application loads custom code using dlopen on the fly. For common symbols, the global symbol table is used by default. However, I want to provide the functionality where – if the user has linked their so with -Bsymbolic-functions, I …

Total answers: 2

Unable to run an executable built with NASM

Unable to run an executable built with NASM I am attempting to assemble the assembly source file below using the following NASM command: nasm -f elf -o test.o test.asm This completes without errors and I then try to link an executable with ld: ld -m elf_i386 -e main -o test test.o -lc This also appears …

Total answers: 1

what's the name of ubuntu package contains llvm linker lld

what's the name of ubuntu package contains llvm linker lld Would like to try this lld from LLVM. The doc on apt could be found here, but I don’t know which package contains the lld executable. It seems the purpose of lld is to remove the system dependency, but clang doesn’t have lld built-in. (Not …

Total answers: 3

how to specify the libstdc++.so.6 to use

how to specify the libstdc++.so.6 to use I am trying to compile a program of mine, that needs C++11 features and a newer version of boost than is installed on the target machine. I therefore compiled and installed gcc 4.9 to some local directory (/secured/local) with an in-tree build of all dependencies and the binutils. …

Total answers: 1

What is AT&T’s Link Editor Command Language?

What is AT&T’s Link Editor Command Language? The man page for ld makes reference to AT&T’s Link Editor Command Language, however a Google search does not offer a satisfactory explanation as to what AT&T’s Link Editor Command Language is or was, other than pointing to said man pages, whereas I expect a Wikipedia page coming …

Total answers: 1

error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory anisha@linux-y3pi:~/> google-earth ./googleearth-bin: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory anisha@linux-y3pi:~/> locate libGL /opt/google/earth/free/libGLU.so.1 /usr/lib64/libGL.so /usr/lib64/libGL.so.1 /usr/lib64/libGL.so.1.2 /usr/lib64/libGLU.so.1 /usr/lib64/libGLU.so.1.3.070802 anisha@linux-y3pi:~/> uname -a Linux linux-y3pi 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 …

Total answers: 2

Why can't ld find this library?

Why can't ld find this library? I’m not very knowledgeable on this topic, and therefore can’t figure out why the following command does not work: $ gfortran -o dsimpletest -O dsimpletest.o ../lib/libdmumps.a ../lib/libmumps_common.a -L/usr -lparmetis -lmetis -L../PORD/lib/ -lpord -L/home/eiser/src/scotch_5.1.12_esmumps/lib -lptesmumps -lptscotch -lptscotcherr /opt/scalapack/lib/libscalapack.a -L/usr/lib/openmpi/ -lmpi -L/opt/scalapack/lib/librefblas.a -lrefblas -lpthread /usr/bin/ld: cannot find -lrefblas collect2: ld returned …

Total answers: 1

Changing linked library for a given executable (CentOs 6)

Changing linked library for a given executable (CentOs 6) I have an executable linked like this: $ ldd a.out libboost_system-mt.so.1.47.0 => /usr/lib64/libboost_system-mt.so.1.47.0 (0x00007f4881f56000) libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f4881cfb000) libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f4881965000) librt.so.1 => /lib64/librt.so.1 (0x00007f488175d000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4881540000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f4881239000) . . Where the libcrypto and libssl libraries are openssl 1.0.0-fips libs. …

Total answers: 2

Getting "Not found" message when running a 32-bit binary on a 64-bit system

Getting "Not found" message when running a 32-bit binary on a 64-bit system I have currently a strange problem on debian (wheezy/amd64). I have created a chroot to install a server (i can’t give any more detail about it, sorry). Let’s call its path /chr_path/. To make things easy, I have initialized this chroot with …

Total answers: 2

Creating Static Binary

Creating Static Binary I installed an application [ e.g. fdisk ]. But it required libraries for execution. I am looking for utility/tool which will help me to create a static binary from already installed binaries. So that I can use it anywhere. The only reliable tools that I found is ErmineLight from here , but …

Total answers: 3

What are stripped and not-stripped executables in Unix?

What are stripped and not-stripped executables in Unix? From man file, EXAMPLES $ file file.c file /dev/{wd0a,hda} file.c: C program text file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped /dev/wd0a: block special (0/0) /dev/hda: block special (3/0) $ file -s /dev/wd0{b,d} /dev/wd0b: data /dev/wd0d: x86 boot sector …

Total answers: 1