ld Questions

1

I am trying to compile a simple hello program using gcc, but getting the below error. i am using ubuntu. gcc -g -o hello hello.c collect2: fatal error: ld terminated with signal 11 [Segmentatio...
Odeen asked 16/7, 2019 at 21:9

3

I have a bunch of object files that have been compiled without the -fPIC option. So the calls to the functions do not use @PLT. (source code is C and is compiled with clang). I want to link these ...
Dissipate asked 21/2, 2018 at 8:41

7

I'm trying to build precimonious on Ubuntu 16.04.3 x64. I allocated 1GB memory for it. My file structure looks like ~ |--- llvm/ |--- precimonious/ where the llvm is on version 3.0 as mentioned ...
Garrotte asked 17/9, 2017 at 1:4

3

I am facing an error whenever I try to compile fortran code: % gfortran Testing_Fortran.f90 -o Testing_Fortran ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLi...
Cartulary asked 4/11, 2022 at 13:47

4

Solved

I have updated my arm-none-eabi GCC and the associated tools and rebuilt an embedded project I develop. $ arm-none-eabi-ld --version GNU ld (GNU Binutils) 2.39 Suddenly, I'm getting the warning /u...
Pfister asked 20/8, 2022 at 20:28

6

I'm trying to create a simple kernel using Ubuntu. In the terminal I typed ld -Ttext 0x1000 -o kernel.bin loader.o main.o Video.o But I got the following error message in return: ld: i386 architec...
Indecisive asked 5/10, 2013 at 17:0

3

I compiled the same project on ubuntu20.04 in wsl and my main used OS archLinux respectively. On wsl, everything went normal, while on archlinux the error message as follows would show: /usr/bin/ld...
Inveracity asked 21/8, 2022 at 15:8

8

Solved

to clarify, my question refers to wrapping/intercepting calls from one function/symbol to another function/symbol when the caller and the callee are defined in the same compilation unit with the GC...
Greer asked 19/12, 2012 at 21:45

2

Solved

Is there a way to get compilers to prefer libraries from LIBRARY_PATH instead of system paths. I am particularly looking for Clang. I partially solved the problem for GCC while writing this questio...
Libbi asked 12/11, 2017 at 11:32

3

Solved

I want to know when I should use ld linker instead off gcc. I just wrote a simply hello world in c++, of course I include iostream library. If I want make a binary file with gcc, I just use: g++ he...
Sack asked 17/4, 2016 at 18:27

3

I am building some legacy code from projects that uses static libraries. Now, I get lots of errors like this: ld: warning: option -m is obsolete and being ignored ld: duplicate symbol <functio...
Aston asked 14/4, 2011 at 20:34

5

Solved

For convenience I added the relevant manpages below. My (mis)understanding first: If I need to separate options with ,, that means that the second -Wl is not another option because it comes before ...
Reinhardt asked 3/7, 2011 at 10:41

1

I am trying to install a project which was developed on Ubuntu, but now I am trying to make it run on Max OSX - version: 10.10.5 (Yosemite). My current ld version that comes by default with OSX: ...
Treenware asked 16/12, 2015 at 20:7

1

I have a linker script like this: OUTPUT_FORMAT(binary) SECTIONS { . = 0xFFFF800000000000 ; .startup_text : { processor.o(.text) } .text : { *(EXCLUDE_FILE (processor.o) .text) } .data : { *(....
Comenius asked 25/1, 2016 at 16:34

3

Solved

For an embedded device, I have file containing an array with function pointers storing interrupt handlers, define like that (I can't modify it): typedef void (*const ISRFunction)(void); __attribu...
Gabriel asked 1/8, 2016 at 9:55

2

I'm currently trying to profile a preloaded shared library by using the LD_PROFILE environment variable. I compile the library with "-g" flag and export LD_PROFILE_OUTPUT as well as LD_PROFILE bef...
Indispensable asked 17/1, 2014 at 21:35

9

Solved

I'm looking for a way to load generated object code directly from memory. I understand that if I write it to a file, I can call dlopen to dynamically load its symbols and link them. However, this ...
Hog asked 19/2, 2011 at 21:30

1

Example: notmain.c int __attribute__ ((noinline)) notmain(int i) { return i + 1; } int notmain2(int i) { return i + 2; } main.c int notmain(int); int main(int argc, char **argv) { return notm...
Nichrome asked 17/7, 2023 at 7:59

13

Solved

I need to optimize the size of my executable severely (ARM development) and I noticed that in my current build scheme (gcc + ld) unused symbols are not getting stripped. The usage of the arm-strip...
Bandog asked 14/7, 2011 at 1:51

5

Solved

What does the ALIGN keyword do in linker scripts? I read many tutorials about linker scripts but I cant understand what really ALIGN do. Can any one explain it simply. Thanks!
Zapateado asked 10/12, 2011 at 16:43

2

Solved

When compiling a c++ project in a conda environment on MacOS Big Sur, the error ld: unsupported tapi file type '!tapi-tbd' in YAML file may occur. How to proceed?
Daciadacie asked 18/9, 2021 at 16:8

21

I have a virtual Debian system which I use to develop. Today I wanted to try llvm/clang. After installing clang I can't compile my old c-projects (with gcc). This is the error: /usr/bin/ld: cannot ...
Sharma asked 13/6, 2011 at 11:35

1

I don't find any useful information on the differences between "-fno-pie" and "-no-pie". Are they gcc flags or ld flags? Are they both necessary or not? I found a piece of makef...
Stirk asked 3/11, 2022 at 8:42

2

Solved

What is the meaning of -l (lowercase "L") flags passed to gcc/g++? And where can I find documentation or tutorials on it? I've tried searching man gcc and man ld for -l, but that has tho...
Kristynkrock asked 11/3, 2023 at 23:33

4

Solved

I have downloaded the latest GLUI source code and now I am trying to compile it. When I do so, I get the following error: g++ -O0 -Wall -pedantic -I./ -I./include -I/usr/X11R6/include -o bin/examp...
Acidforming asked 6/5, 2010 at 0:38

© 2022 - 2025 — McMap. All rights reserved.