[ILUG] Statically linking only used functions

Bryan O'Donoghue typedef at eircom.net
Fri Sep 10 11:52:44 IST 2004


Library:

libblah.a


void do_something();
void not_used();

Proggie:

proggie_blah

#include <blah.h>

int main(int argc, char argv[]){

	do_something();
  return 0;
}


gcc -o proggie_blah /usr/lib/libblah.a proggie_blah.c

Is there anyway in the static link case above, to only link 
do_something() and not link not_used(), am I reaching here?



More information about the ILUG mailing list