Library coding standards question
Hello all, I am having some trouble interpreting a portion of the Library Behavior section of the Gnu coding standards. The problem spots are indicated by the questions enclosed in brackets: 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. If anyone would shed some light on the questions that I inserted into the text, I would be extremely grateful. Thanks in advance, John ___ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool
Re: Library coding standards question
jks [EMAIL PROTECTED] 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 ([EMAIL PROTECTED]) http://www.eyrie.org/~eagle/ ___ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool