Linker won't bail out on non-existing functions?

Alexander Monakov
Fri Sep 4 11:45:04 GMT 2020

On Fri, 4 Sep 2020, Josef Wolf wrote:

> So why won't the linker bail out when it can't resolve a reference?
> Any hints?

You're linking with --gc-sections, and if all references to undefined functions
are in discarded sections, the linker won't complain. In other words, checking
for remaining undefined references happens after discarding unneeded sections.


More information about the Gcc-help mailing list