This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Apr 12, 2003, Hal Black <hablack at vt dot edu> wrote:
Why should it be different for a .a file with the same .o files in it? Should .a files not be used for C++?
Because .o files are copied to the output, whereas .a files are used as libraries, i.e., only members that offer symbols that are being looked for are copied to the output. Can you imagine the bloat if any time you linked with a static library, all of the code in it was copied to your executables?
------------------ From the C++ draft spec 2 December 1996:
Section 3.7.1: 2 If an object of static storage duration has initialization or a destructor with side effects, it shall not be eliminated even if it appears to be unused, except that a class object or its copy may be eliminated as specified in 12.8. ------------------
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |