Questions tagged [linker]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
23 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 ...
0
votes
0answers
23 views

how to make build toolchains from debian distro

How can I make building toolchain from old debian distro? I develop the applications on Debian 10. I use arm toolchain (from yocto) to compile applications to the ARM platform. Now I need to compile ...
0
votes
0answers
15 views

get path from all linked shared libraries while linking

I have my own linux distribution for an selfmade arm hardware. Therefor I have to compile diffenent software like nginx and openssl. Every compiled software will packed to an rpm. To reduce size I ...
17
votes
1answer
901 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 ...
0
votes
0answers
22 views

How to specify in kernel so that kernel doesn't use a range of physical address?

I am building kernel and I see that that in the system map there are certain addresses where Text Code is available. I don't want a range of physical address to be used by kernel. I want to do this ...
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 ...
0
votes
1answer
1k views

Force linker to find stdc++ library in non-standard directory

I've read a lot of guidance that says the LD_LIBRARY_PATH is searched before anything else, but one of my .so libraries is linking with libtdc++.so.6 in /usr/lib64. ldd mylib.so: ... libstdc++.so.6 =&...
6
votes
3answers
34k 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 ...
0
votes
1answer
2k views

Compile Git to use OpenSSL library libssl.so.1.0.1

Running a system that only has full support for OpenSSL version 0.9.8. Installed in parallel is OpenSSL 1.0.1 libraries (Supported by Distro) Git still preferentially uses the 0.9.8 libraries but we ...
1
vote
2answers
677 views

Extracting the size and origin of all symbols in an ELF

I am trying to estimate the code size of a binary's various components. I have access to the source code and resulting build directory containing all built object files. Of course, I want to include ...
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 ...
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
0answers
30 views

GNU Linker Colorization

Compiling code with GCC or Clang can result in some colorful error outputs. Linking code, however, doesn't enjoy the same luxury. It seems like the GNU Linker doesn't support colorized error output ...
3
votes
3answers
222 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
776 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@...
1
vote
2answers
665 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[...
0
votes
4answers
2k views

Compiling C/C++ code by way of including preprocessor build instructions in an actual C/C++ source file

I've got reasons for not wanting to rely on a specific build system. I don't mean to dis anybody's favorite, but I really just want to stick to what comes with the compiler. In this case, GCC. ...
4
votes
1answer
97 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 ...
0
votes
1answer
2k views

Link libraries when compiling g++

I am trying to link some libraries my g++ code and I am getting the following error: $ g++ -O myprob.o -o myprob -Wl,-rpath $PATH/lib -L$PATH/lib -lprob7_cpp -lprob7 g++.exe: error: c:\mypath;c:\...
1
vote
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 ...
4
votes
2answers
298 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 ...
-5
votes
2answers
178 views

BUG in clang linker - name resolving issue

I found bug in clang, and i post it here because it's very difficult to find how to do it in clang system. I think this information in useful - i saw similar questions in web. So, clang makes wrong ...
-1
votes
1answer
147 views

what are the executable ELF files respectively for static linker, dynamic linker, loader and dynamic loader?

In Linux, what are the executable ELF files respectively for static linker dynamic linker loader dynamic loader? Which of them are invoked by execve() by dlopen()? How are they invoked by execve(...
70
votes
2answers
48k 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 ...
0
votes
1answer
1k views

GNU Linker differences between the different 32bit emulation modes?

What is the difference between the 386 and 32 bit options in ld -V? elf32_x86_64 elf_i386 i386linux i386pep i386pe And, where can I find the documentation on these "emulation modes"
1
vote
1answer
276 views

Manually linking shared object files

I've been diving into dependency hell on an embedded Yocto Linux project recently in an attempt to compile and install a large project. I frequently run into an error while installing the dependencies ...
0
votes
2answers
659 views

Creating a link to a shared library

I have a library ( ZendDebugger.so ) which in turn requires the openssl library but it doesn't find a reference to it. Indeed when ZendDebugger.so loads, it prints this error on the error log ( which ...
1
vote
1answer
594 views

Difference between the linker flags

I'm adding c++ runtime and exception support to the Linux kernel. For that, I need to provide my own lib/gcc and lib/libstdc++instead of the standard libraries provided by the compiler. So, I am ...
1
vote
1answer
450 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-...
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
1answer
379 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 ...
1
vote
1answer
106 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 ...
0
votes
1answer
2k views

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 ...
0
votes
1answer
175 views

How to link libraries without root permissions

I am trying to compile OpenMPI without root permissions on my local account in a cluster, but I have the following error. /usr/bin/ld: cannot find -libcm /usr/bin/ld: cannot find -lnuma /usr/bin/ld: ...
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?
0
votes
1answer
85 views

Determine when the platform offers LD_LIBRARY_PATH?

I want to detect when the platform offers LD_LIBRARY_PATH to load libraries from an arbitrary location. The application is a lightweight shell script, so I am looking for a method that does not ...
6
votes
1answer
948 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 ...
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, ...
2
votes
0answers
461 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 ...
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 ...
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:...
37
votes
1answer
49k 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 ...
2
votes
1answer
391 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 ...
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:...
2
votes
0answers
311 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. ...
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 ...
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
49 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 ...
1
vote
1answer
684 views

Unable to compile vapoursynth: failed to link zimg [closed]

I'm trying to compile vapoursynth and have run into a linker issue which I don't understand how to solve. Here is what I have so far: I have compiled zimg from github github: buaazp/zimg and have ...
1
vote
2answers
161 views

Linker error about -laudio

I'm trying to make rcssmonitor and I get the following error: /usr/bin/ld: cannot find -laudio I'm using Linux Mint 17.2. with gcc 4.8.4.