The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [linker]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
70
votes
2answers
49k views

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 ...
37
votes
1answer
50k views

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 ...
28
votes
2answers
54k views

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/...
23
votes
4answers
3k views

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 ...
17
votes
1answer
910 views

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 ...
13
votes
3answers
11k views

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 ...
8
votes
1answer
2k views

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?
7
votes
1answer
1k views

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:...
6
votes
3answers
36k views

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 ...
6
votes
1answer
986 views

Linker script in .so file? (libc.so) Is that right?

I am currently trying to get python to run on my NAS which is a Zyxel NSA325. I did manage to get python 2.7 and pip running and I was able to successfully install the watchdog module with pip. I ...
6
votes
2answers
14k views

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 ...
6
votes
1answer
4k views

Understanding SPL & U-Boot Memory Map using bdinfo?

We are using beaglebone black based custom board, I want to write some test results into RAM location from SPL, and read that log and send it via tftpput to the host PC. So far I'm able to do tftpput ...
5
votes
1answer
27k views

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 ...
5
votes
3answers
5k views

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, ...
5
votes
4answers
3k views

Error while loading shared libraries

My project tree looks something like that: src/ include/ Makefile lib/ lib/3rdparylib/ I didn't code 3rdpartylib, but decided to embed its source code in my project packaging. I compile the ...
5
votes
2answers
794 views

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 ...
5
votes
1answer
6k views

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/...
4
votes
1answer
15k views

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" ...
4
votes
2answers
302 views

Is there any relationship between linking binaries and symbolic links?

Is there any relationship between the linking of binaries (as in dynamic or static linking) and symbolic links. Do they interact in any way, or share some history, or are these two completely ...
4
votes
1answer
922 views

Why do some files of working packages return “not found” for some libraries of ldd's output?

I'm finding a bunch of stuff where working packages contain files where ldd returns "not found" for some libraries. For example... /usr/lib64/thunderbird/libprldap60.so libldap60.so => not ...
4
votes
1answer
3k views

How to deal with conflicting names of two shared libraries?

On my Linux Mint 17.3 system, I installed the packages libglfw2 and libglfw-dev. Since GLFW v3 is not available in repositories, I chose to compile it manually using instructions here. Almost all ...
4
votes
1answer
118 views

Placed library in /usr/lib, but ldconfig doesn't put it in cache

I'm starting a project that requires an external shared library third-party.so. I've placed it in /usr/lib. However, when I run sudo ldconfig -v, it's not listed. ldconfig -p | grep third-party.so ...
3
votes
3answers
259 views

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, ...
3
votes
1answer
808 views

undefined reference, even when the linked library does exist

I'm trying to compile VTK from source and I received the following error. I'm running Fedora 27, kernel version 4.14.11-300.fc27.x86_64 /usr/lib64/libSM.so: undefined reference to `uuid_generate@...
2
votes
1answer
552 views

How to compile manual files .1

I have .c, .h, and .1 files, how can I compile them together in one executable file. Everything clear with .c and .h files, but I have also .1 as I can see from the content it is used for manual, how ...
2
votes
3answers
923 views

Placement of kernel binary and sources for kernel module building?

I'm trying to setup an environment for kernel module development in Linux. I've built the kernel in the home folder and would like to place the sources and binaries to the correct place so include ...
2
votes
2answers
503 views

Where is the frame.h located in modern Linux implementations? (ubuntu specifically)

A book I am reading refers to an include file that shows how a stack frame looks on one's UNIX system. In particular: /usr/include/sys/frame.h I am having trouble finding the modern equivalent. ...
2
votes
1answer
36 views

Is the dynamic linker automatically invoked by the operating system or by code embedded in the ELF file?

I'm not sure, whether the dynamic linker /usr/bin/ld is automatically invoked by the operating system, when the ELF file is loaded, or whether it's invoked by code embedded in the ELF file? When I ...
2
votes
1answer
935 views

CUPS compilation fails on Cygwin

I was brave and tried to compile CUPS in a 32-bit Cygwin environment. I used the standard sources from the tarball. All went fine until linking. http://pastebin.com/QSKvLSmT Here's the end of the ...
2
votes
1answer
410 views

GNU linker producing useless spacing between sections in ELF file

My intent is to place the text section at a specific location in memory (0x00100000). SECTIONS { . = 0x00100000; .text : { *(.text*) } } Although the linker does do ...
2
votes
2answers
1k views

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 ...
2
votes
2answers
2k views

Specifying local libc does call global libc?

If I run the command foo specifying a a different libc to use as follows: LD_LIBRARY_PATH=$PATH_TO_MY_CUSTOM_LIBC foo Is the globally defined libc used to run any of the command given above? For ...
2
votes
1answer
437 views

Using `ldconfig` while not touching system files

I have compiled a library and now I should run ldconfig. However, I would rather not modify /etc/ld.so.conf, nor any other system file. Is it possible to generate the cache somewhere else and then ...
2
votes
1answer
3k views

Linker errors when compiling against glib…?

I'm having trouble compiling a simple, sample program against glib on Ubunutu. I get these errors. I can get it to compile but not link with the -c flag. Which I believe means I have the glib ...
2
votes
2answers
7k views

Linking issues with libjpeg

I have a game I'm writing which recently required libjpeg. I wrote some code using libjpeg on some-other-machine and it worked as expected. I pulled the code to this machine and tried compiling and ...
2
votes
2answers
2k views

libxml linker error

I've got an app which won't link, giving error: /usr/lib64/libcroco-0.6.so.3: undefined reference to `xmlGetProp@LIBXML2_2.4.30' /usr/lib64/libcroco-0.6.so.3: undefined reference to `xmlFree@...
2
votes
1answer
46 views

Annotating any files

I have had this problem for a very long time, had several discussions with friends, and tried searching relating info online. All efforts were in vain so I decide to give a shot here. I have lots of ...
2
votes
1answer
5k views

How to compile gcc toolchain with special sysroot correctly?

I try to compile a new gcc, including binutils and glibc. Since I can not be root, I want to install it all in ~/local. I set these variables: PREFIX=~/local && export PREFIX PATH=~/local/bin:...
2
votes
1answer
415 views

De-prioritize ld.conf.so.d library path resolution

From a separate question, and other articles on the subject, it appears that additional library paths defined by ld.so.conf.d will always be resolved (i.e. in the case of a name clash, such as when ...
2
votes
0answers
483 views

libtool: error: relink 'libpocketsphinx.la' with the above command before installing it

When I trying to install pocketsphinx by make install command(after ./autogen.sh , ./configure, make commands) , I get this error message: libtool: error: relink 'libpocketsphinx.la' with the above ...
2
votes
0answers
328 views

cannot find -lm linker error

This question is highly related to cannot find -lm, but the error appears when I'm invoking cross G++ Linker. I'm trying to follow through the documentation provided by Using Eclipse with ARTIK SDK. ...
2
votes
0answers
53 views

What is the background of the program segmentation?

Each program is separated into several segments like: code segment data segment stack segment heap segment But who was responsible for that progression? The compiler and linker has to support that ...
2
votes
0answers
881 views

How to fix link error under CMake for class QX11Info on Mac OS X

I'm trying to build kxstitch, which is designed for Linux, on OS X. I've gotten most of the way there by installing MacPorts, XCode, KDE, etc. and making minor changes to the build file, but am ...
1
vote
1answer
494 views

Is ld.so an executable?

$ file /lib/ld-linux.so.2 /lib/ld-linux.so.2: symbolic link to i386-linux-gnu/ld-2.27.so $ readlink -f /lib/ld-linux.so.2 /lib/i386-linux-gnu/ld-2.27.so $ file /lib/i386-linux-gnu/ld-2.27.so /lib/i386-...
1
vote
3answers
2k views

GCC: set architecture to pass to linker

GNU C compiler passes the wrong architecture name to the linker. For example gcc helloworld.i throws the error ld: unknown/unsupported architecture name: -arch arm. After some experimenting with LD, ...
1
vote
2answers
698 views

What do compile and link line refer to?

While installing the cudnn library, I came across this in the INSTALL.txt file: Add [installpath] to your build and link process by adding -I[installpath] to your compile line and -L[...
1
vote
1answer
6k views

How to link OpenSSL library in macOS using gcc?

I have OpenSSL installed through the Homebrew package manager. I have found the library and header files I need. The headers are: /usr/local/Cellar/openssl/1.0.2h_1/include/openssl /usr/local/...
1
vote
1answer
1k views

How to get the REAL gcc (not the one that is hashed to clang) in MacOS?

I am trying to compile a program that uses the OpenSSL library. I had a problem where it couldn't find the header files. I fixed this problem by adding the option -I /usr/local/opt/openssl/include ...
1
vote
1answer
124 views

What is the difference between the runtime linker (ld.so) and the prelink program?

What is the difference between the runtime linker (ld.so) and the prelink program? I know the runtime linker (ld.so) loads all the dynamic libraries needed for a program but what is the benefit of ...
1
vote
1answer
50 views

How strong is the promise that .so.x.y.z will exist?

I have an application that requires OpenCV 2.4.11 to link, so in my make file I ensure I use the following linker flag pattern: -l:libopencv_core.so.2.4.11 How robust is this assumption? My ...