------- Comment #42 from matz at gcc dot gnu dot org 2006-12-07 13:57 ------- I agree with Jan and HJ here. We must not emit symbols to unreferenced symbols. Even the size increase wouldn't be really acceptable. In a way ELF _is_ special here, so special handling is completely justified. In which way it's handled specially that's not so important. For instance one could introduce a new two-pass process_pending_assemble_externals, where on ELF the first pass would do nothing, and on other platforms whatever is necessary, and on the last pass [at end of compilation] emit the referenced hidden symbols on ELF, and do nothing on != ELF.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20218