You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OSv code uses the weak_alias() macro in dozens of places, directly or through the LFS64() macro. I think we should have an alias() macro and use that instead of weak_alias() in many, if not all, the places where weak_alias() is currently used.
weak_alias() appears it used for two reasons:
Musl code (libc//.c) defines the real function with a name __mktemp(), and then makes the regular name mktemp() a weak alias for that. That supposedly allows a program to redefine mktemp() to something else, and still use the library function, calling it __mktemp().
LFS64() and two or three other uses of weak_alias(). Here, we don't really need a weak symbol. In my opinion, it makes little sense to have stat() a strong symbol which cannot be overriden by the program, and yet stat64() is weak, and can be overridden.
Finally, I don't think we even need weak symbols for #1 above. I believe our linker always look first in the program and not the kernel, so any symbol can be overriden by the program, not just weak symbols. I believe we ignore the "weak" parameter of symbols.
The text was updated successfully, but these errors were encountered:
This is a low-priority "nitpick" kind of issue.
OSv code uses the weak_alias() macro in dozens of places, directly or through the LFS64() macro. I think we should have an alias() macro and use that instead of weak_alias() in many, if not all, the places where weak_alias() is currently used.
weak_alias() appears it used for two reasons:
Finally, I don't think we even need weak symbols for #1 above. I believe our linker always look first in the program and not the kernel, so any symbol can be overriden by the program, not just weak symbols. I believe we ignore the "weak" parameter of symbols.
The text was updated successfully, but these errors were encountered: