Bug 905184 - Ld.so.cache ignored on arm when objects that have ABI headers are mixed with objects without.
Summary: Ld.so.cache ignored on arm when objects that have ABI headers are mixed with ...
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 18
Hardware: arm
OS: Linux
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
Reported: 2013-01-28 19:16 UTC by Brendan Conoboy
Modified: 2016-11-24 15:53 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-03-31 19:00:53 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Sourceware 15006 None None None Never

Description Brendan Conoboy 2013-01-28 19:16:55 UTC
Description of problem:

A patch to binutils (http://sourceware.org/git/?p=binutils.git;a=commit;h=cd49363b8ae1725522ea29ccc0dda7b138f3d5aa) has introduced an unintended regression in ld.so.  Specifically, when an object that has the new ABI header is compared against an object that has *no* ABI header it is considered a mismatch in ld.so.cache.  The desired behavior is that no ABI header is treat it as the equivalent of a wildcard.

Version-Release number of selected component (if applicable):

Unknown.  Presumably the behavior has been in glibc for a while but only came up as a result of binutils adding the elf fields glibc needed.

How reproducible:

Every time.

Steps to Reproduce:
1. Install a library that is only available via ld.so.cache (EG, /usr/lib/atlas/libf177blas.so).  This library will be visable via 'ldconfig -p'.
2. Link an executable with -L/usr/lib/atlas
3. Running the executable will result in libf177blas.so not being found.
4. If you add /usr/lib/atlas to LD_LIBRARY_PATH the executable will work.  It's just ld.so.cache that is broken.
Actual results:

Shared library not found.

Expected results:

Dynamic linker finds library, proceeds normally.

Additional info:

Binutils is doing the right thing by marking objects with their ABI, but we can't retroactively fix all the objects built prior to the October/November binutils update.  We just need glibc to treat unmarked objects as using the same ABI as objects that are marked.

Comment 1 Fedora Admin XMLRPC Client 2013-01-28 20:09:38 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Carlos O'Donell 2013-01-29 15:16:51 UTC
Working on a fix for this.

Comment 3 Carlos O'Donell 2013-02-05 23:27:11 UTC
Still working on this.

I've been informed that this should be checked in ASAP e.g. tonight or tomorrow.

I can't get it all done tonight, I still need some more testing.

Likely tomorrow morning, and post upstream, and get it into rawhide.

Comment 4 Carlos O'Donell 2013-02-05 23:27:40 UTC
Any other branches that this needs checking into?

Comment 5 Brendan Conoboy 2013-02-05 23:50:11 UTC
Please check in to both f18 updates and rawhide.

Comment 6 Carlos O'Donell 2013-02-06 19:52:07 UTC
Retesting patch.

Comment 7 Carlos O'Donell 2013-02-07 05:14:37 UTC
Patch sent upstream:

We want to reserve the ld.so.cache value with upstream before we use it.

Comment 8 Carlos O'Donell 2013-02-08 03:54:50 UTC
Upstream accepted the patch.

I'll commit upstream tomorrow.

I'm almost done the rawhide commit, but I've run out of time tonight.

I'll commit rawhide tomorrow morning.

Following the rawhide committ I'll do a larger backport to F18. The F18 backport requires more additional changes and more testing.

Comment 9 Carlos O'Donell 2013-02-08 16:39:52 UTC
The fix for this is in rawhide and thus F19.

Still working on the F18 fix.

Comment 10 Carlos O'Donell 2013-02-08 17:33:52 UTC
Committed upstream:

commit b39949d21179bd0b08a083e4f7e35d0c98e11294
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Fri Feb 8 12:26:12 2013 -0500

    ARM: Support loading unmarked objects from cache.
    ARM now supports loading unmarked objects from
    the dynamic loader cache. Unmarked objects can
    be used with the hard-float or soft-float ABI.
    We must support loading unmarked objects during
    the transition period from a binutils that does
    not mark objects to one that does mark them with
    the correct ELF flags.
    Signed-off-by: Carlos O'Donell <carlos@redhat.com>

Comment 11 Carlos O'Donell 2013-02-08 17:44:55 UTC

Can you confirm that you actually see this issue in F18?

The F18 glibc is based on 2.16 which doesn't have any of the code to safely support mixed ABI environments. The 2.16 loader will load any of the objects from any of the ABIs.

Therefore there can be no bug in F18. At best it would be a new feature request for F18.

Can you confirm please?

Comment 12 Brendan Conoboy 2013-02-08 20:40:20 UTC
Have not observed on F18.  As long as an F18 doesn't contain the mixed ABI recognition code we no need to do anything there.

Comment 13 Peter Robinson 2013-03-31 19:00:53 UTC
Fixed in F-19+

Note You need to log in before you can comment on or make changes to this bug.