[TriLUG] executable and non-executable libraries

Owen Berry oberry at trilug.org
Tue May 15 16:28:41 EDT 2007


On Tue, May 15, 2007 at 01:21:39PM -0700, Joseph Mack NA3T wrote:
> I guess there's more to it than looking for main(). I wonder 
> how you nominate a start point when you write a library.

In the man page of ld:

  -e entry
  --entry=entry
     Use  entry  as  the  explicit  symbol for beginning execution of your program,
     rather than the default entry point.  If there is no symbol named  entry,  the
     linker  will try to parse entry as a number, and use that as the entry address
     (the number will be interpreted in base 10; you may use a leading 0x for  base
     16, or a leading 0 for base 8).

That's probably it.

Owen



More information about the TriLUG mailing list