LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Statically linking only used functions

[ILUG] Statically linking only used functions

Bryan O'Donoghue typedef at eircom.net
Mon Sep 13 10:16:48 IST 2004


Rory Browne wrote:

What I was hoping for was a mythical linker options a-la Mr Foster, 
which would remove non-referenced, or non-internally referenced 
functions, when linking directly to libblah.a "gcc -o blah 
/usr/lib/libblah.a"

> Personally if I was using SQLite I'd use it as a dynamic library.

That would be optimal, but at the same time, a single file, requires 
much less intervention by someone installing, especially if they are not 
so familiar with Linux... or at least... in theory
> Unless you really need your binaries/deps to be as small as
> possible(perhaps for embedded work)

I think there is a vague to outside chance that the resulting binary 
_might_ get recompiled/retargetted for use on some sort of low end 
motorola CPU, used under cygwin or just banged out in a production 
version under WhiteBox/Suse

>  > there is no(?) link-time advantage to putting functions
>  > into individual files for a shared library, which is,
>  > IMHO, why this seems to be a dying art/skill/science?

To be honest, I've never heard of putting each function into a seperate 
file, I'd say there's more then a few nails in that particular coffin !




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell