在 2024-08-17 16:34, Pali Rohár 写道:
When static is removed then init_scprintf is marked with uppercase T, same as _scprintf. So it looks like that for GNU binutils, the init_scprintf is global / exported when static keyword is not present.So it looks like that the symbol can escape from the .o file and can be referenced by other files.
Ahh I see. If the function is called then GCC emits `.def` at the end of assembly output, where `.scl 2` seems to have the same effect as `.globl`.
For me this does not look safe.
I agree. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public