When you define the same function (non-static) in two different C source files, compile them and link them to the Microsoft linker, you will get an error message with a duplicate character, as expected.
On the other hand, when you define a function that matches the name of a standard library function, for example. cos(which is not defined as COMDAT), then there is no error; your definition silently overrides the standard library definition. This is also the desired behavior, but I'm trying to figure out what the exact rule is.
Are rule characters defined in an object file overriding characters defined in a library file, or something else? I can't find mention of this in the PE spec, but maybe I'm missing something.
source
share