[haiku-commits] Re: haiku: hrev49989 - src/kits/interface headers/private/interface

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 6 Jan 2016 22:54:14 +0100

On 06.01.2016 22:30, looncraz wrote:

On 1/6/2016 14:56, Ingo Weinhold wrote:
This is just how ELF symbol preemption works. The application image is
loaded first, hence its symbols override equally named, publicly
visible ones from libraries. As a consequence each symbol of a library
should either be put in a proper namespace or declared hidden.

The application isn't overriding the symbol, the system library is
overriding the application's symbol, which seems backwards.  I find it
interesting that it is so selective, only conflicting in one method,
despite the other name collisions.  Really seems that there should be a
linker error.

Ah, sorry, I misread your previous mail. Indeed this behavior doesn't sound correct and would deserve further investigation.

In any event, I could have sworn that application symbols were suppose
to take precedence (ignoring the fact that libbe should not have had any
class in the global namespace without the B prefix in the first place
;-) ).

Yes, they usually do -- if the application image is loaded first (which is the case, unless something else is pre-loaded) and the application's symbol isn't weaker than the library's.

How does inheritance work with libraries then for gcc4?

Not sure what you mean.

CU, Ingo

Other related posts: