public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Ryan Maurer <maurer@ugcs.caltech.edu>
To: Jeff Dike <jdike@addtoit.com>, Tejun Heo <tj@kernel.org>,
	Paul Mundt <lethal@linux-sh.org>,
	Mike Frysinger <vapier@gentoo.org>,
	Michal Simek <monstr@monstr.eu>, Tim Abbott <tabbott@ksplice.com>
Cc: user-mode-linux-devel@lists.sourceforge.net,
	user-mode-linux-user@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: [PATCH] UML: UML libc linking error fix
Date: Tue, 27 Apr 2010 05:16:26 -0700	[thread overview]
Message-ID: <4BD6D59A.5070908@ugcs.caltech.edu> (raw)

From: Matthew Maurer <maurer@ugcs.caltech.edu>

Fixes linking for UML against newer libcs by adding two hidden symbols
which are now expected.
Signed-off-by: Matthew Maurer <maurer@ugcs.caltech.edu>
---
Apologies ahead of time if I've missed something or if this has already
been fixed somewhere I couldn't find it.
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index 7fcad58..85babf5 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -50,8 +50,21 @@ SECTIONS
   .rela.got       : { *(.rela.got) }
   .rel.bss        : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
   .rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
-  .rel.plt        : { *(.rel.plt) }
-  .rela.plt       : { *(.rela.plt) }
+  /* Deal with multilib libc */
+  .rel.plt        :
+  {
+    *(.rel.plt)
+    PROVIDE_HIDDEN (__rel_iplt_start = .);
+    *(.rel.iplt)
+    PROVIDE_HIDDEN (__rel_iplt_end = .);
+  }
+  .rela.plt       :
+  {
+    *(.rela.plt)
+    PROVIDE_HIDDEN (__rela_iplt_start = .);
+    *(.rela.iplt)
+    PROVIDE_HIDDEN (__rela_iplt_end = .);
+  }
   .init           : {
     KEEP (*(.init))
   } =0x90909090
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
index e7a6cca..50d80e8 100644
--- a/arch/um/kernel/uml.lds.S
+++ b/arch/um/kernel/uml.lds.S
@@ -35,6 +35,21 @@ SECTIONS
     *(.gnu.warning)
     *(.gnu.linkonce.t*)
   }
+  /* Deal with multilib libc */
+  .rel.plt        :
+  {
+    *(.rel.plt)
+    PROVIDE_HIDDEN (__rel_iplt_start = .);
+    *(.rel.iplt)
+    PROVIDE_HIDDEN (__rel_iplt_end = .);
+  }
+  .rela.plt       :
+  {
+    *(.rela.plt)
+    PROVIDE_HIDDEN (__rela_iplt_start = .);
+    *(.rela.iplt)
+    PROVIDE_HIDDEN (__rela_iplt_end = .);
+  }

   . = ALIGN(PAGE_SIZE);
   .syscall_stub : {
Signed-off-by: Matthew Maurer <maurer@ugcs.caltech.edu>

                 reply	other threads:[~2010-04-27 12:26 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=4BD6D59A.5070908@ugcs.caltech.edu \
    --to=maurer@ugcs.caltech.edu \
    --cc=jdike@addtoit.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=tabbott@ksplice.com \
    --cc=tj@kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=user-mode-linux-user@lists.sourceforge.net \
    --cc=vapier@gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox