[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Library coding standards question

From: Russ Allbery
Subject: Re: Library coding standards question
Date: Fri, 22 Feb 2002 23:08:07 -0800
User-agent: Gnus/5.090005 (Oort Gnus v0.05) XEmacs/21.4 (Common Lisp, sparc-sun-solaris2.6)

jks <address@hidden> writes:

> "Choose a name prefix for the library, more than two characters
> long. All external function and variable names should start with this
> prefix. In addition, there should only be one of these [one name prefix,
> one external function, one variable name, or one of something else?] in
> any given library member [what is the meaning of "library member" in
> this context?]. This usually means putting each one [one what?] in a
> separate source file."

Only one of each external function or variable name, and library member is
generally an individual .o file.  The reason to put only one external
function in each .o is that linkers generally can only shed unwanted
baggage at the level of individual .o files, and therefore if something in
a .o file is needed, the whole file will be linked in.  This guideline is
therefore intended to minimize the size of statically linked binaries by
giving the linker maximum freedom to drop unused code.

Russ Allbery (address@hidden)             <>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]