Bug 17832 - strip --strip-unneeded removes needed symbol from object file in archive
Summary: strip --strip-unneeded removes needed symbol from object file in archive
Status: RESOLVED DUPLICATE of bug 4716
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-12 19:48 UTC by Adam C. Foltzer
Modified: 2015-01-20 18:59 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
archives in question (97.96 KB, application/x-bzip2)
2015-01-12 19:48 UTC, Adam C. Foltzer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam C. Foltzer 2015-01-12 19:48:44 UTC
Created attachment 8063 [details]
archives in question

I'm working on a project targeting RHEL/CentOS 5.

On 32-bit systems with binutils 2.17, `strip --strip-unneeded` strips a required symbol from a static archive, causing a subsequent linking to fail due to an unresolved symbol.

On 64-bit systems with binutils 2.17, the same command does not cause any problems.

I've attached the archives built for both architectures, both unstripped. The symbol in question is `Threefish_256_Process_Block`, and should be defined in the `threefish_block.o` member of the archive. After stripping, the 32-bit version will have no symbols defined in that object file, but the 64-bit version will keep it.

I did a local install of binutils 2.18, and using those there are no problems on either architecture.
Comment 1 Alan Modra 2015-01-13 11:22:56 UTC
Report this bug to Redhat.  Since the bug has already been fixed eight binutils releases ago there is no point reporting it here.
Comment 2 law 2015-01-20 18:59:47 UTC

*** This bug has been marked as a duplicate of bug 4716 ***