Bug 1292230
Summary: | ld doesn't resolve symbols in linked to library | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Dave Johansen <davejohansen> |
Component: | Red_Hat_Enterprise_Linux-Release_Notes-7-en-US | Assignee: | Lenka Špačková <lkuprova> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | high | Docs Contact: | Vladimír Slávik <vslavik> |
Priority: | high | ||
Version: | 7.2 | CC: | fweimer, law, lkuprova, nate.groendyk, nickc, ohudlick, rhel-docs, vslavik |
Target Milestone: | rc | Keywords: | Documentation |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Deprecated Functionality | |
Doc Text: |
Symbols from libraries linked as dependencies no longer resolved by *ld*
Previously, the *ld* linker resolved any symbols present in any linked library, even if some libraries were linked only implicitly as dependencies of other libraries. This allowed developers to use symbols from the implicitly linked libraries in application code and omit explicitly specifying these libraries for linking.
For security reasons, *ld* has been changed to not resolve references to symbols in libraries linked implicitly as dependencies.
As a result, linking with *ld* fails when application code attempts to use symbols from libraries not declared for linking and linked only implicitly as dependencies. To use symbols from libraries linked as dependencies, developers must explicitly link against these libraries as well.
To restore the previous behavior of *ld*, use the "-copy-dt-needed-entries" command-line option.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-01-09 10:42:32 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Dave Johansen
2015-12-16 19:22:44 UTC
Apparently, this was an intended change: https://fedoraproject.org/wiki/UnderstandingDSOLinkChange https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking I just looked through the release notes for RHEL 7 and didn't see anything about this, so could it please be documented, so others don't have to jump through all of the same hurdles that we do. Correct. This was an intentional change. I thought I was documented somewhere already for RHEL 7. It might be in the developer guide. I'm reassigning to the doc folks to confirm its location. Apologies, this totally slipped through the net. The change should've been documented in the Release Notes for the respective version of RHEL. Unfortunately, that didn't happen, and -- on top of that -- I forgot about this bug. Feel free to yell at me -- that shouldn't have happened. I'm now reassigning this to the Release Notes component, and we'll figure out how to deal with it. That is, we'll definitely add the info to the 7.2 Release Notes document, but we might also highlight it in the current or upcoming Release Notes. I'll leave that for Lenka's consideration. Thank you all for the input. The doc text has been added to Release Notes for Red Hat Enterprise Linux 7.0 through 7.4 and will be carried over in the future minor releases (which we normally do with Deprecated Functionality descriptions). Is it possible to add a linker flag to ES6 to enforce explicit DSO linking (as is default in ES7?) (In reply to Nathaniel Groendyk from comment #16) > Is it possible to add a linker flag to ES6 to enforce explicit DSO linking > (as is default in ES7?) Yes. You can add the "--no-copy-dt-needed-entries" option to the linker command line. Or if you are invoking the linker via gcc/g++ then "-Wl,--no-copy-dt-needed-entries" should do the trick. |