[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: Unexpected behavior of dynamic linker
From:       Ivan Radovanovic <radovanovic () gmail ! com>
Date:       2015-12-26 12:52:45
Message-ID: 567E8D9D.6080808 () gmail ! com
[Download RAW message or body]

On 12/26/15 13:28, Konstantin Belousov napisa:
>
> This is expected behaviour, it is mandated by the ELF standard.  ELF
> tried to emulate the behaviour of the static libraries as much as possible.
> Think what would happen in your case if both modules where linked statically
> into the binary.
>
> To augment the behaviour, read about linker option -Bsymbolic, compiler
> option -fhidden, and GNU-specific attribute __visibility__("hidden").
>

Thanks for pointer about attributes (it does work as expected if I add 
__attribute__((visibility("hidden"))) to private classes).

This behavior still looks counter-intuitive to me - like linker is 
resolving already resolved reference, however problem is solved. Thanks!
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic