This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: is main() provided by a library valid C ?
On Fri, May 20, 2005 at 08:38:47AM +0200, Peter S. Mazinger wrote:
> Is it allowed (as of linking) that the function main() been provided by a
> shared or static library instead of an object (*.o) ?
The linker doesn't care. main in a static library will definitely work.
main in a shared lib will probably require a special startup file,
ie. the code that runs from _start to main.
--
Alan Modra
IBM OzLabs - Linux Technology Centre