All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] prelink: Allow it to work on 64 bit binaries in /lib
Date: Tue, 29 Sep 2015 14:26:27 +0100	[thread overview]
Message-ID: <1443533187.5162.34.camel@linuxfoundation.org> (raw)

Checks within prelink force 64 bit binaries into lib64 and n32 binaries
into lib32. We load prelink.conf with all combinations but this code
then defeats it for us and means /lib is ignored.

Comment out this code to disable it and allow our settings to work. This
allows 64 bit binaries in /lib to work. We pass in the correct dyanamic 
loader path anyhow and our binaries don't contain ld.so so this should
be safe for us.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/recipes-devtools/prelink/prelink/64bitfix.patch b/meta/recipes-devtools/prelink/prelink/64bitfix.patch
new file mode 100644
index 0000000..74b1a7d
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink/64bitfix.patch
@@ -0,0 +1,35 @@
+These checks force 64 bit binaries into lib64 and n32 binaries into lib32. We
+load prelink.conf with all combinations but this code then defeats it for us
+and means /lib is ignored.
+
+Comment out this code to disable it and allow our settings to work. This
+allows 64 bit binaries in /lib to work. We pass in the correct dyanamic 
+loader path anyhow and our binaries don't contain ld.so so this should be
+safe for us.
+
+Upstream-Status: Inappropriate
+RP 2015/9/23
+
+
+Index: trunk/src/rtld/rtld.c
+===================================================================
+--- trunk.orig/src/rtld/rtld.c
++++ trunk/src/rtld/rtld.c
+@@ -334,7 +334,7 @@ load_ld_so_conf (int use_64bit, int use_
+ 
+   /* Only use the correct machine, to prevent mismatches if we
+      have both /lib/ld.so and /lib64/ld.so on x86-64.  */
+-  if (use_64bit)
++  /*if (use_64bit)
+     {
+       dst_LIB = "lib64";
+       add_dir (&ld_dirs, "/lib64/tls", strlen ("/lib64/tls"));
+@@ -350,7 +350,7 @@ load_ld_so_conf (int use_64bit, int use_
+       add_dir (&ld_dirs, "/usr/lib32/tls", strlen ("/usr/lib32/tls"));
+       add_dir (&ld_dirs, "/usr/lib32", strlen ("/usr/lib32"));
+     }
+-  else
++  else*/
+     {
+       dst_LIB = "lib";
+       add_dir (&ld_dirs, "/lib/tls", strlen ("/lib/tls"));
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index 79a5f501..0cbce36 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -27,6 +27,7 @@ FILES_${PN}-cron = "${sysconfdir}/cron.daily ${sysconfdir}/default"
 PACKAGES =+ "${PN}-cron"
 
 SRC_URI = "git://git.yoctoproject.org/prelink-cross.git;branch=cross_prelink \
+           file://64bitfix.patch \
            file://prelink.conf \
            file://prelink.cron.daily \
            file://prelink.default \




             reply	other threads:[~2015-09-29 13:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 13:26 Richard Purdie [this message]
2015-09-29 17:12 ` [PATCH] prelink: Allow it to work on 64 bit binaries in /lib Khem Raj
2015-09-29 18:11   ` Mark Hatle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1443533187.5162.34.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.