[comp.sys.mac.programmer] Smart linking oversize code resources in LSC

brown@galaxy.ee.rochester.edu (Eric Brown) (01/13/89)

Distribution: 
Reply-To: brown@ee.rochester.edu (Eric Brown)
Organization: UR Dept. of Electrical Engg, Rochester NY 14627

Ok, here's the problem: I have a code resource that has about 27k
worth of code I am actually using.  Right now, the code size
numbers in the right side of the project menu add up to about
38k.  10k of this is for the entire MacTraps library I added of
which I am only using about 10 calls.  The other excess 2-3k is
a little extra code I have in a few .c files that I am not really
ever going to call.  Now, I could delete the extra stuff in my .c
files and code the 10 Traps I need in assemly language, make my
project and build the code resource.  The annoying thing is, I
shouldn't have to do this at all - not when LSC provides a smart
linker.  Here's what happens when I try to Build the 38k project:
I get a link error, code segment to big.  Yea, so it is, but if
the smart linker did its work, it wouldn't be. I know this because
I once had a code resource whose objects added to 16k before I
built it.  After building it with the smart linker, the actual
resource turned out to be only 6.5k.  So far, I've also tried to
put some of the code in a library and include it - but the smart
linker still dosent kick in.  If anybody knows how to get the 
smart linker to run without LSC complaining first, I'd much ap-
preciate it.  If you could, please respond by e-mail.

-Eric.