Re: weak symbols vs archive libraries

2012-04-18 Thread Andriy Gapon
on 18/04/2012 13:49 Konstantin Belousov said the following: > This is from the ELF standard version 1.2 PDF, page 1-5: > > When the link editor searches archive libraries, it extracts archive > members that contain definitions of undefined global symbols. The member's > definition may be either a

Re: weak symbols vs archive libraries

2012-04-18 Thread Konstantin Belousov
On Wed, Apr 18, 2012 at 01:36:26PM +0300, Andriy Gapon wrote: > > I just would like to share something that I stumbled upon. > Maybe this is something well known, then forgive me for the noise. > > When ld combines multiple object files it overrides weak symbol definitions > with > a strong defi

weak symbols vs archive libraries

2012-04-18 Thread Andriy Gapon
I just would like to share something that I stumbled upon. Maybe this is something well known, then forgive me for the noise. When ld combines multiple object files it overrides weak symbol definitions with a strong definition (if any). There are many examples/demonstrations on the Internet on h