https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116159

--- Comment #6 from Martin Storsjö <martin at martin dot st> ---
(In reply to Jonathan Wakely from comment #4)
> But is that even going to work on this target when the actual symbol has __Z
> ?
> 
> 00000000 T __ZNSt8ios_base4InitC1Ev
> 
> (why doesn't the alias give an error when defined?)

Indeed, this is quite surprising. I think this just happens to work as long as
there are no relocations against ios_base_library_init - i.e. as long as we
don't try to call it, ld.bfd seems to accept the undefined symbol silently,
while LLD errors out.

(In reply to Jakub Jelinek from comment #5)
> So on mingw we link with -Wl,--version-script=.../gnu.ver and ld just
> ignores it?

IIRC it doesn't entirely ignore it - version scripts can be used with ld.bfd
for mingw targets, for pattern/glob matching to choose which symbols to export
and which to hide. But it doesn't actually apply any symbol version, no.

Reply via email to