Re: ld: once multiple symbol definitions are allowed, both definitions end up in the executable

2017-01-17 Thread Pavel Shishpor
ink.c:8380 Any clues how to debug it? Also I have not tried COMDAT magic: looks like there are no any external tweaks to put function to COMDAT sections but g++ decides on its own what should be go to COMDAT sections. On Wed, Jan 11, 2017 at 8:50 PM, Jim Wilson wrote: > On 01/11/2017 01

ld: once multiple symbol definitions are allowed, both definitions end up in the executable

2017-01-11 Thread Pavel Shishpor
Hello, Could please someone advice is it a bug or a feature when we get both bodies of the functions with the same name in the executable once multiple symbol definitions are allowed? Here is the example showing the behavior: $ cat main.c int f() {return 6;} int main() { return f();} $ cat a.c