This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Entry point in a relocatable object file
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