Bug 10168

Summary: On-target binutils produces non-running code when linking with "-Wl,-z,nocopyreloc" on ARM or PPC
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Mark Hatle <mark.hatle>
Component: devtools / tool chainAssignee: Unassigned <unassigned>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Medium CC: mark.hatle, meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie, sgw
Version: 2.2   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

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