Commit Graph

4 Commits

Author SHA1 Message Date
Richard Purdie c4901328fe patchelf: Fix issues with the 'hole' in binaries approach
We're seeing two issues with patchelf, one where it inflates binaries to MBs in
size, the other where stripping the resulting binary fails:

$ strip fixincl
Not enough room for program headers, try linking with -N
[.note.ABI-tag]: Bad value

The patch header describes more about what the problem is and how the patch
fixes it.

[YOCTO #11123]
[YOCTO #11009]

(From OE-Core rev: 39f5a05152aa0c3503735e18dd3b4c066b284107)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-07 20:05:31 +00:00
Fabio Berton d03439e0db patchelf: Update to version 0.9
* Remove patch maxsize.patch already applied upstream.

 * Add patch Skip-empty-section-fixes-66.patch to prevent errors like:

  /
  |ERROR: go-cross-1.6.2-r0 do_populate_sysroot_setscene: '('patchelf-uninative',
  |'--set-interpreter', '/home/user/src/prj/build/tmp/sysroots-uninative/
  |x86_64-linux/lib/ld-linux-x86-64.so.2', '/home/user/src/prj/build/tmp/
  |work/x86_64-linux/go-cross/1.6.2-r0/sstate-install-populate_sysroot/x86_64-
  |linux/usr/bin/aarch64-prj-linux/go')'
  |failed with exit code 1 and the following output:
  |cannot find section .rela.dyn
  \

  * Add patch handle-read-only-files.patch to fix error when building
    eSKD, the following error appears on task do_testsdkext

  /
  |ERROR: db-native-6.0.30-r1 do_populate_sysroot_setscene: '('patchelf-uninative',
  |'--set-interpreter', 'src/fsl-community-bsp/build/tmp/work/qemuarm-poky-linux-
  |gnueabi/core-image-minimal/1.0-r0/testsdkext/tc/tmp/sysroots-uninative/
  |x86_64-linux/lib/ld-linux-x86-64.so.2', 'src/fsl-community-bsp/build/tmp/work/
  |qemuarm-poky-linux-gnueabi/core-image-minimal/1.0-r0/testsdkext/tc/tmp/work/
  |x86_64-linux/db-native/6.0.30-r1/sstate-install-populate_sysroot/x86_64-linux/
  |usr/bin/db_tuner')' failed with exit code 1 and the following output:
  |b'open: Permission denied\n
  \

  * Add patch Increase-maxSize-to-64MB.patch to fix error described
  bellow, the same issue is discussed here:
    - https://github.com/NixOS/patchelf/issues/47

  /
  |ERROR: qemu-native-2.5.0-r1 do_populate_sysroot_setscene: '('patchelf-uninative',
  |'--set-interpreter', '../build/tmp/sysroots-uninative/x86_64-linux/lib/
  |ld-linux-x86-64.so.2', '../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
  |sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64')'
  |failed with exit code 1 and the following output:
  |warning: working around a Linux kernel bug by creating a hole of 36032512
  |bytes in ‘../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
  |sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64’
  |maximum file size exceeded
  \

(From OE-Core rev: 18efcbcb896239c64fedd009ce57f3f0c668cbc0)

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Richard Purdie 576a248b46 patchelf: Add patch to handle large files
There were "maximum size exceeded" errors from patchelf when processing
qemu-native. There is an issue open for this upstream, add a patch
proposed there for this issue. "32" was increased to "64" to handle our
qemu-ppc binary.

(From OE-Core rev: 79d320544202d719eeb5affd9b687505dcd9b725)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-06 23:10:45 +00:00
Richard Purdie a90346e6c3 patchelf: Add patchelf recipe
This is useful since it allows us to edit the RPATH and interpreter fields
in ELF binaries. This is potentially particularly useful in improving the way
we can use the SDK and also potentially making native binaries more relocatable.

(From OE-Core rev: 003766fb2e50b11914ca06947ecfa039429b0815)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:42 +01:00