This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld: Simple Linker Script Example
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Barry Rountree <rountree at uga dot edu>
- Cc: <binutils at sources dot redhat dot com>
- Date: 06 Nov 2003 21:01:50 -0500
- Subject: Re: ld: Simple Linker Script Example
- References: <200311062050.50637.rountree@uga.edu>
Barry Rountree <rountree@uga.edu> writes:
> I'm puzzling my way through the ld documentation and I think I'm in need of
> the "hello, world!" of linker scripts -- the minimal linker script that will
> link two C files together into an executable.
Well, what kind of executable? One that runs on a simple embedded
system, or one that runs on GNU/Linux? For GNU/Linux, is the
executable statically or dynamically linked?
If you want a dynamically linked executable to work on GNU/Linux, you
need a moderately complex linker script. That's a lot of the
complexity in the default linker script.
The same applies to Solaris, or indeed to any ELF system using dynamic
linking.
Ian