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 ?
- From: "Peter S. Mazinger" <ps dot m at gmx dot net>
- To: Joakim Tjernlund <Joakim dot Tjernlund at lumentis dot se>
- Cc: Daniel Jacobowitz <drow at false dot org>, <binutils at sourceware dot org>
- Date: Fri, 20 May 2005 08:38:47 +0200 (CEST)
- Subject: RE: is main() provided by a library valid C ?
On Fri, 20 May 2005, Joakim Tjernlund wrote:
> >
> > On Thu, May 19, 2005 at 11:14:25PM +0200, Joakim Tjernlund wrote:
> > > >
> > > > On Thu, May 19, 2005 at 10:40:07PM +0200, Joakim Tjernlund wrote:
> > > > > If my memory serves me right, to build libc w/ -z defs, main needs to be declared
> > > > > weak in libc.
> > > >
> > > > Incorrect. Libc doesn't need to mention main at all. Please look at
> > > > glibc's CRT files.
> > >
This is becoming out of topic, my question isn't answered though:
Is it allowed (as of linking) that the function main() been provided by a
shared or static library instead of an object (*.o) ?
Peter
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2