瀏覽代碼

package/patchelf: new host package

In some situations, users may want to tweak the dynamic section of the
binaries (for example to add/set the RPATH to $ORIGIN/../lib).

Because it is not trivial to do it properly from the Buildroot
infrastructure, allow those users to use patchelf (e.g. from a
post-build script) to tweak binaries.

patchelf is able to:
  - modify an existing DT_RUNPATH tags
  - add a DT_RUNPATH tag if not already present
  - do the above to the DT_RPATH tag, too
  - set the path to the interpreter
  - remove DT_NEEDED tags
  - query a binary for the DT_RUNPATH/DT_RPATH tag, or for the
    interpreter path

Does not really fix #7172, but this is an appropriate workaround.

[Thomas: change license to GPLv3+, as mentionned in the project's
README file.]

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Yann E. MORIN 11 年之前
父節點
當前提交
8f570cd765
共有 3 個文件被更改,包括 20 次插入0 次删除
  1. 1 0
      package/Config.in.host
  2. 7 0
      package/patchelf/Config.in.host
  3. 12 0
      package/patchelf/patchelf.mk

+ 1 - 0
package/Config.in.host

@@ -13,6 +13,7 @@ menu "Host utilities"
 	source "package/omap-u-boot-utils/Config.in.host"
 	source "package/openocd/Config.in.host"
 	source "package/parted/Config.in.host"
+	source "package/patchelf/Config.in.host"
 	source "package/pwgen/Config.in.host"
 	source "package/sam-ba/Config.in.host"
 	source "package/squashfs/Config.in.host"

+ 7 - 0
package/patchelf/Config.in.host

@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_PATCHELF
+	bool "host patchelf"
+	help
+	  PatchELF is a small utility to modify the dynamic linker
+	  and RPATH of ELF executables.
+
+	  http://nixos.org/patchelf.html

+ 12 - 0
package/patchelf/patchelf.mk

@@ -0,0 +1,12 @@
+################################################################################
+#
+# patchelf
+#
+################################################################################
+
+PATCHELF_VERSION = 0.8
+PATCHELF_SITE = http://releases.nixos.org/patchelf/patchelf-0.8/
+PATCHELF_LICENSE = GPLv3+
+PATCHELF_LICENSE_FILES = COPYING
+
+$(eval $(host-autotools-package))