Where did all my memory go?

@ChrisTenone

You're right, I apologize. Inadequate spec. I am using 1.6.11 but I lose track of Apple's cute names. I am using the version right before "Sierra", but since my Mac is in the office and I'm not, and my iPad doesn't support PTP (psychic transfer protocol), I can't read the version number from here (My Mac is configured for PTP wakeup, if it senses that it is me trying to access it. But IOS does not support PTP at all, "because of concerns for security and privacy").

Some linkers do code-level inclusion; if a function is not called, it is not linked in, even if some other functions which are called are in the same compilation unit. Functions called internally are, of course, loaded. Some linkers link the entire compilation unit, even if it contains two dozen functions that are not called from the client app. If I see a gigantic module image, I can start figuring out how to refactor it so only the code that is needed will be loaded. Or, alternatively, evaluate if that library is really necessary.

For some linkers I have used, the choice between code-level and module-level inclusion is a command-line option. In some tool chains, I could do, in the program C/C++ source,

#pragma comment(linker, "linker-option-here")

(e.g. Microsoft C++)

It has been 25 years since I last used the gcc tool chain, and I have no idea of its current state of sophistication.
joe