Dynamic linking again

Alastair Reid alastair@reid-consulting-uk.ltd.uk
01 Sep 2002 19:53:50 +0100


> As it is noted, it produces large executibles since all symbols get
> exported. I've not yet been able to find a way to limit the symbols
> that are exported.

Useful GNU ld flags in this respect are:

  --whole-archive (for GHC files which have been 'split')

  --retain-symbols-file filename 

    filename contains a list of symbols to be exported

You can also use objcopy to hide symbols in a .o or .a file
before you apply ld -r 

--
Alastair Reid                 alastair@reid-consulting-uk.ltd.uk  
Reid Consulting (UK) Limited  http://www.reid-consulting-uk.ltd.uk/alastair/