This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld: Simple Linker Script Example


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]