Bug 10168 - On-target binutils produces non-running code when linking with "-Wl,-z,nocopyreloc" on ARM or PPC
Summary: On-target binutils produces non-running code when linking with "-Wl,-z,nocopy...
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-08-20 00:56 UTC by Mark Hatle
Modified: 2022-02-11 20:34 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hatle 2016-08-20 00:56:58 UTC
The prelink test suite has two tests (reloc8 and reloc9) that attempt to link an application with "-Wl,-z,nocopyreloc".  This worked through "krogoth" but no longer works on master.

The easiest way to reproduce the problem is to build a system using the default 'master' configuration, adding:

IMAGE_INSTALL_append = " packagegroup-core-buildessential ssh sshd binutils-staticdev elfutils gdb file git"
EXTRA_IMAGE_FEATURES_append = " dev-pkgs"
IMAGE_ROOTFS_SIZE = "524288"

then build using:  MACHINE=qemuarm bitbake core-image-base

Boot into the system, and clone (using git) "git://git.yoctoproject.org/prelink-cross"

The run the following:

autoreconf -if
./configure
make
make check

The reloc8 and reloc9 test used to pass, and no longer do.  (It is expected there will be two failures, the preload1 and quick2 tests.)
Comment 1 Randy MacLeod 2021-09-23 15:24:07 UTC
We should retest to see if this is still a problem.
Comment 2 Randy MacLeod 2022-02-11 20:34:36 UTC
Prelink support has been dropped:
https://git.openembedded.org/openembedded-core/log/?qt=range&q=23c0be78106f1d1e2bb9c724174a1bb8c56c2469