All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Stubbs <ams@codesourcery.com>
To: "Hatle, Mark" <Mark.Hatle@windriver.com>, <yocto@yoctoproject.org>
Subject: [prelink-cross][patch] Fix layout1 test on x86_64 x32.
Date: Fri, 16 Dec 2016 14:52:36 +0000	[thread overview]
Message-ID: <67edb1f0-90af-cccc-3a9a-4a9dd6fc442b@codesourcery.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

Hi Mark,

The layout1 test case currently fails for x32 because there is 
insufficient address space for all the libraries.

There's two ways to fix this:

1. Increase mmap_end such that there's more space.

2. Reduce max_page_size so that less space is wasted.

I'm not sure what the implications of option 2 would be, so the attached 
patch implements option 1.

This still limits the number of possible libraries somewhat severely, 
but it's more than enough to pass the layout1 test.

Andrew

[-- Attachment #2: prelink-fix-x32-layout1-test.patch --]
[-- Type: text/x-patch, Size: 856 bytes --]

From 6c8aec5590ba9ba93e6cbb458c34ead0481b0b7c Mon Sep 17 00:00:00 2001
From: Andrew Stubbs <ams@codesourcery.com>
Date: Fri, 16 Dec 2016 14:08:28 +0000
Subject: [PATCH] Fix x32 layout1 test.

2016-12-16  Andrew Stubbs  <ams@codesourcery.com>

	* src/arch-x86_64.c (PL_ARCH(x32)): Set mmap_end to 0x60000000.
---
 src/arch-x86_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/arch-x86_64.c b/src/arch-x86_64.c
index 6a97370..5c95f47 100644
--- a/src/arch-x86_64.c
+++ b/src/arch-x86_64.c
@@ -595,7 +595,7 @@ PL_ARCH(x32) = {
      Also, if this guard area isn't too small, typically
      even dlopened libraries will get the slots they desire.  */
   .mmap_base = 0x41000000,
-  .mmap_end =  0x50000000,
+  .mmap_end =  0x60000000,
   .max_page_size = 0x200000,
   .page_size = 0x1000
 };
-- 
2.8.1


             reply	other threads:[~2016-12-16 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 14:52 Andrew Stubbs [this message]
2016-12-16 17:02 ` [prelink-cross][patch] Fix layout1 test on x86_64 x32 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=67edb1f0-90af-cccc-3a9a-4a9dd6fc442b@codesourcery.com \
    --to=ams@codesourcery.com \
    --cc=Mark.Hatle@windriver.com \
    --cc=yocto@yoctoproject.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.