]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
uml: fix CONFIG_STATIC_LINK=y build failure with newer glibc
authorRoland McGrath <roland@redhat.com>
Tue, 26 Oct 2010 21:22:19 +0000 (14:22 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 13 Jul 2011 03:31:26 +0000 (05:31 +0200)
commit aa5fb4dbfd121296ca97c68cf90043a7ea97579d upstream.

With glibc 2.11 or later that was built with --enable-multi-arch, the UML
link fails with undefined references to __rel_iplt_start and similar
symbols.  In recent binutils, the default linker script defines these
symbols (see ld --verbose).  Fix the UML linker scripts to match the new
defaults for these sections.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/um/kernel/dyn.lds.S
arch/um/kernel/uml.lds.S

index 7fcad58e216db26022eb32bd581134a67849af8b..3d6b43f75841fcecaa45436d2b762e03bb484917 100644 (file)
@@ -50,8 +50,18 @@ 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) }
+  .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
index 664f94216eb739cdb799b4396f30a0d96d3dc0f4..79a077ad033fa9f5628f82e62ab17c1e669cd661 100644 (file)
@@ -43,6 +43,23 @@ SECTIONS
        __syscall_stub_end = .;
   }
 
+  /*
+   * These are needed even in a static link, even if they wind up being empty.
+   * Newer glibc needs these __rel{,a}_iplt_{start,end} symbols.
+   */
+  .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 = .);
+  }
+
   #include "asm/common.lds.S"
 
   init.data : { INIT_DATA }