Entry point in a relocatable object file

Ian Lance Taylor ian@wasabisystems.com
Tue Dec 9 05:13:00 GMT 2003


Djath Kokou <Kokou.Djath@ixfin-mmarellise.com> writes:

> Is it possible to specify an entry point with the linker in a relocatable
> output file (-r option) ?

This is a binutils question, not a compiler question.

The answer is yes.  However, precisely what the effects will be
depends upon your object file format.  For example, in an ELF object
file, typically all sections will have a VMA of zero.  So while you
can specify a start address, there isn't much you can safely do with
it, since the start address is just an address, and you can't reliably
determine which section that address refers to.

Ian



More information about the Gcc-help mailing list