Bug 11101 - host-patchelf Endian Issue with relative RPATH
Summary: host-patchelf Endian Issue with relative RPATH
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2018.02.2
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-19 14:14 UTC by bryce.ferguson
Modified: 2018-06-26 20:04 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bryce.ferguson 2018-06-19 14:14:24 UTC
Hello,

This problem was discovered with the package: sudo.  In builds for PowerPC architecture, the sudo ELF file contains an invalid symbol after fix-rpath script is run.  The following entry below:

0x1d000000 (<unknown>: 1d000000)        0xb77

When it should be:

0x0000001d (RUNPATH)                    Library runpath

Should be the RUNPATH entry (0x1d).  Because of this, sudo cannot find the proper libraries at runtime and fails to execute.  It appears, when looking at the readelf output, that there is an endian problem here when the host differs from the target.

I have traced this to the host-patchelf utility. (Patchelf is executed by the fix-rpath script.)  When the --make-rpath-relative option is specified, there is a possibility that this can occur.  Wondering why this does not occur on other packages, I added the --debug option to the patchelf command in the fix-rpath script and ran the build again.  This time, I see that most of the packages in my build report "No RPATH to make relative", except for sudo.

I've tried to build for mutliple architectures (ARM, x86/_64, PPC).  So far this only occurs for PowerPC builds.  Perhaps a possible workaround having to do with the install location of the sudo libraries is needed?

Thanks!