HP3000-L Archives

March 1995, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mike Paivinen <[log in to unmask]>
Reply To:
Mike Paivinen <[log in to unmask]>
Date:
Thu, 23 Mar 1995 00:53:33 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
Ross Scroggs ([log in to unmask]) wrote:
<snip>
: Well now I'm cooking! 107776 -> 40704 -> 26624 bytes for Hello World.
: (HP-UX version is 12288.) But, question remains, what's the difference
: between the three programs?
 
I'm doing this from memory without the assistance of any notes.  I expect
the readers of this list to correct any error I make.  [...as will I once
I can find my notes.]  /lib/lic.a is the POSIX RL.  When you use c89 in the
POSIX.2 shell, we [MPE/iX] assume you want to compile with the POSIX versions
of the C library functions.  There are a number of differences between the
POSIX C library functions and the non-POSIX C library functions...particularly
in the file system functions.  The POSIX RL is a "thin" RL with a set of
routines that provide the POSIX.1-defined interfaces and then call routines
in XL.PUB.SYS that do the actual work.  That explains why the first link was
the biggest.
 
When you link with LIBCINIT and LIBCSHR, you are no longer linking with the
POSIX C library functions.  You are either linking with the ANSI C library
functions or the <I don't remember the other name> C library functions.
LIBCINIT was the outer block for C programs prior to the shared globals
function being released.  It contains data definitions for all of the global
variables that have to be shared between a C program and the C library in
XL.PUB.SYS.  Again, we're speaking non-POSIX here.  It's smaller than
/lib/libc.a because it doesn't contain the interface routines that the POSIX
library does and it's bigger than LIBCSHR because it contains the global
variable storage allocation.  LIBCSHR is the correct library for binding with
a non-POSIX C program on C.50.00 and later.  Now that shared globals have been
implemented in 5.0, the C program no longer needs to define the storage space
for all of the globals that will be shared between the program and the C
library in XL.PUB.SYS.  That's why this link is the smallest.  Or it may simply
be that _start is smaller with shared globals.
 
Mike P.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Mike Paivinen
[log in to unmask]
 
Hewlett-Packard
CSY - Mailstop 47UP
19447 Pruneridge Avenue
Cupertino, CA   95014

ATOM RSS1 RSS2