4 ms·
There is no information about the function's prototype in the object file, so the linker can't determine that. The compiler can't either since it's just compili
by kryptiskt 3y ago
There is no information about the function's prototype in the object file, so the linker can't determine that. The compiler can't either since it's just compiling the compilation unit and has no knowledge of the outside world except what we tell it by prototypes (injected via header files or otherwise), but we aren't doing that here.
- Someone 3y ago> There is no information about the function's prototype in the object file, so the linker can't determine that. That that information isn’t there is an implementation choice. For example, they could have hacked it in like C++ did by mangling names (https://en.wikipedia.org/wiki/Name_mangling https://en.wikipedia.org/wiki/Name_mangling). That probably would have required supporting longer identifiers (IIRC archives limited them to 14 characters), but that’s doable.