Ensure the linker pulls in static libraries containing exported functions.

Previously, an exported function contained in a library would not be found by
the linker if the library did not contain symbols transitively reachable from
main.


Note for review: I am making the assumption that "_main" will appear in Settings.EXPORTED_FUNCTIONS if it is desired in the output, and that if it is not desired, it is OK to discard.  I believe this is a reasonable assumption, but there may be a corner case I don't know about.