Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] UML: UML libc linking error fix

7 views
Skip to first unread message

Matthew Ryan Maurer

unread,
Apr 27, 2010, 8:26:52 AM4/27/10
to Jeff Dike, Tejun Heo, Paul Mundt, Mike Frysinger, Michal Simek, Tim Abbott, user-mode-...@lists.sourceforge.net, user-mode-...@lists.sourceforge.net, linux-...@vger.kernel.org
From: Matthew Maurer <mau...@ugcs.caltech.edu>

Fixes linking for UML against newer libcs by adding two hidden symbols
which are now expected.
Signed-off-by: Matthew Maurer <mau...@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 <mau...@ugcs.caltech.edu>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

0 new messages