lkml.org 
[lkml]   [2008]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.26-rc5-mm1: uml link error
Miklos Szeredi wrote:
> I get this error on linking uml:
>
> /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld:arch/um/kernel/vmlinux.lds:267: syntax error
>
> Reverting 'kernel-call-constructors.patch' fixes it.

Should be fixed with the patch below (applies on top of
kernel-call-constructors.patch):

--

From: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>

Fix for linker error on UML:

/usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld:arch/um/kernel/vmlinux.lds:267: syntax error

The error is triggered by the use of SORT(CONSTRUCTORS) in the UML
linker script which conflicts with the kernel-call-constructors patch.
Here is what the ld info page says about sorting constructors:

If you are using the GNU C++ support for initialization priority,
which provides some control over the order in which global
constructors are run, you must sort the constructors at link time
to ensure that they are executed in the correct order.

As there's no C++ code inside the kernel it should be safe to remove
the SORT construct.

Found-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
---
arch/um/kernel/dyn.lds.S | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.26-rc5-mm2/arch/um/kernel/dyn.lds.S
===================================================================
--- linux-2.6.26-rc5-mm2.orig/arch/um/kernel/dyn.lds.S
+++ linux-2.6.26-rc5-mm2/arch/um/kernel/dyn.lds.S
@@ -102,7 +102,7 @@ SECTIONS
*(.data.init_irqstack)
DATA_DATA
*(.data.* .gnu.linkonce.d.*)
- SORT(CONSTRUCTORS)
+ CONSTRUCTORS
}
.data1 : { *(.data1) }
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }

\
 
 \ /
  Last update: 2008-06-10 12:55    [W:0.246 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site