tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: "Fixing" new ld(1) DT_NEEDED handling



On Sun, Oct 13, 2013 at 01:23:15AM +0400, Valery Ushakov wrote:
> 
> Linker and Libraries Guide / Part No: 819-0690-10 / November 2011,
> page 37:
> 
> | If a shared object has dependencies on other shared objects, these
> | dependencies can also be processed.  This processing occurs after
> | all command line input files have been processed, to complete the
> | symbol resolution process.  However, the shared object names are not
> | recorded as dependencies in the output file image being generated.
> 
> So pkgsrc already should be handling the new way to work on Solaris,
> shouldn't it?

Nope: Solaris is using the 'traditional' behaviour where a program can
reference symbols in dependant libraries but only ends up with a
single DT_NEEDED entry.
IIRC this the way the dynamic linkey works (even on Linux).

The gnu_ld have f*cked this up completely.

It seems to me that they should have added 2 new type of DT_NEEDED
to shared libraries, the first would hide the symbols from the main
program, the second (actually less useful) would generate a normal
DT_NEEDED entry in the main program.

Then the dynamic linker could be modified to behaive the same way.
(ie put some of the symbols into a separate namespace).

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index