Top "Ld" questions

The ld (linker or loader) program combines object files, archive files and (references from) shared libraries, relocates their data and addresses together with symbol references.

How to get GCC linker command?

How can I get the command line GCC uses to invoke ld? I have a problem for an AVR target …

command-line gcc ld
Strange warnings from the linker (ld)

We are building a Mac OSX application which is written mostly in Obj-C/Cocoa. The application then statically links with …

xcode macos ld
load warning: cannot find entry symbol _start

I'm learning assembly programming. Below is the simple program that prints 'Hello, World!'. While the program runs perfectly, I'm …

linux assembly warnings nasm ld
Get the start and end address of text section in an executable

I need to get the start and end address of an executable's text section. How can I get it? I …

c gcc ld
let's analyse "collect2: ld returned 1 exit status"?

I know this indicates a linker problem, mostly unresolved symbols. I know that to resolve that problem / to get rid …

c++ g++ makefile ld
How to force gcc to link an unused static library

I have a program and a static library: // main.cpp int main() {} // mylib.cpp #include <iostream> struct S { …

c++ c gcc g++ ld
Any difference between "-Wl,option" and "-Xlinker option" syntax for gcc

I have been looking through some configuration files and I've seen both being used (albeit on different architectures). If you're …

c gcc linker ld
Requirements to use flto

If I want to compile my project with -flto is it enough to have built gcc with --enable-gold or do …

gcc ld binutils lto gold-linker
Why does the order of '-l' option in gcc matter?

I am trying to compile a program which uses udis86 library. Actually I am using an example program given in …

c gcc linker ld
Force GNU linker to generate 32 bit ELF executables

Hi I am currently generating x86 assembly for a compiler that I am writing and am having some trouble linking …

linux assembly x86 ld elf