public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: blaisorblade_spam@yahoo.it
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, jdike@addtoit.com,
	user-mode-linux-devel@lists.sourceforge.net,
	blaisorblade_spam@yahoo.it
Subject: [patch 11/11] uml: update ld scripts to newer binutils
Date: Thu, 13 Jan 2005 22:01:13 +0100	[thread overview]
Message-ID: <20050113210113.D81F91FEFD@zion> (raw)


It seems that linker script for userspace software are quite
toolchain-depending, at least because what we use is a merge between builtin
LD scripts (see strings /usr/bin/ld) and normal kernel linking scripts.

Plus, a number of people are having toolchain-related troubles building UML
(even assertion failures on linking, with Gentoo and Fedora 2).

So, let's try to make UML nicer for binutils.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
---

 linux-2.6.11-paolo/arch/um/kernel/dyn.lds.S |    3 +++
 linux-2.6.11-paolo/arch/um/kernel/uml.lds.S |   10 +++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff -puN arch/um/kernel/uml.lds.S~uml-update-lds-to-ld-version arch/um/kernel/uml.lds.S
--- linux-2.6.11/arch/um/kernel/uml.lds.S~uml-update-lds-to-ld-version	2005-01-13 05:53:48.582270064 +0100
+++ linux-2.6.11-paolo/arch/um/kernel/uml.lds.S	2005-01-13 05:56:06.458309720 +0100
@@ -7,8 +7,12 @@ jiffies = jiffies_64;
 
 SECTIONS
 {
+  /*This must contain the right address - not quite the default ELF one.*/
+  PROVIDE (__executable_start = START);
   . = START + SIZEOF_HEADERS;
 
+  /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
+   * is remapped.*/
   __binary_start = .;
 #ifdef MODE_TT
   .thread_private : {
@@ -20,9 +24,13 @@ SECTIONS
   }
   . = ALIGN(4096);
   .remap : { arch/um/kernel/tt/unmap_fin.o (.text) }
-#endif
+
+  /* We want it only if we are in MODE_TT. In both cases, however, when MODE_TT
+   * is off the resulting binary segfaults.*/
 
   . = ALIGN(4096);		/* Init code and data */
+#endif
+
   _stext = .;
   __init_begin = .;
   .init.text : {
diff -puN arch/um/kernel/dyn.lds.S~uml-update-lds-to-ld-version arch/um/kernel/dyn.lds.S
--- linux-2.6.11/arch/um/kernel/dyn.lds.S~uml-update-lds-to-ld-version	2005-01-13 05:53:48.583269912 +0100
+++ linux-2.6.11-paolo/arch/um/kernel/dyn.lds.S	2005-01-13 05:53:48.616264896 +0100
@@ -7,8 +7,11 @@ jiffies = jiffies_64;
 
 SECTIONS
 {
+  PROVIDE (__executable_start = START);
   . = START + SIZEOF_HEADERS;
   .interp         : { *(.interp) }
+  /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
+   * is remapped.*/
   __binary_start = .;
   . = ALIGN(4096);		/* Init code and data */
   _stext = .;
_

                 reply	other threads:[~2005-01-13 22:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050113210113.D81F91FEFD@zion \
    --to=blaisorblade_spam@yahoo.it \
    --cc=akpm@osdl.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox