Blaisorblade wrote: > On Wednesday 05 April 2006 05:59, D. Bahi wrote: > >> Jeff Dike wrote: >> >>> On Tue, Apr 04, 2006 at 04:48:20PM -0400, D. Bahi wrote: >>> >>>> arch/um/os-Linux/sys-i386/registers.c: In function 'get_thread_regs': >>>> <...snip...> >>>> arch/um/os-Linux/sys-i386/registers.c:139: error: 'JB_BP' undeclared >>>> (first use in this function) >>>> make[4]: *** [arch/um/os-Linux/sys-i386/registers.o] Error 1 >>>> make[3]: *** [arch/um/os-Linux/sys-i386] Error 2 >>>> make[2]: *** [arch/um/os-Linux] Error 2 >>>> make[1]: *** [build] Error 2 >>> usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss >>> mismatches non-TLS reference in arch/um/os-Linux/built-in.o >>> /lib/libc.so.6: could not read symbols: Bad value >>> > So don't declare it,nor include <linux/errno.h>; include <errno.h> instead, > which should contain the correct definition. > > If you get other link errors, send us the result of > > $ strings $(which ld) > ldStrings > $ bzip2 ldStrings > > and I'll try to write a patch. > argh. sorry about that misdirection. <errno.h> is the right include to fix the problem.
the two patches i needed to build 2.6.17-rc1 on a fresh FC5 system are attached. i am now running it with filesystem: http://uml.nagafix.co.uk/FedoraCore5 and have not modified the FC5 host kernel or filesystem in any way. it doesn't eat the umid= arg (no uml_utilities on the host?) and there is an initcall failure related to tls - but i get a prompt and that's pretty cool thank you all very much. linux-2.6.17-rc1 umid=happy ubd0=cow1,root_fs.fc-5 Checking that ptrace can change system call numbers...OK Checking syscall emulation patch for ptrace...OK Checking advanced syscall emulation patch for ptrace...OK Checking PROT_EXEC mmap in /tmp...OK Checking for the skas3 patch in the host: - /proc/mm...not found - PTRACE_FAULTINFO...not found - PTRACE_LDT...not found UML running in SKAS0 mode Adding 9007104 bytes to physical memory to account for exec-shield gap <...snip...> Checking for host processor cmov support...Yes Checking for host processor xmm support...No Checking that host ptys support output SIGIO...Yes Checking that host ptys support SIGIO on close...No, enabling workaround /usr/include/linux/aio_abi.h not present during build 2.6 host AIO support not used - falling back to I/O thread not_dead_yet : couldn't open pid file '/home/rtrsvcs/dbahi/.uml/happy/pid', err = 1 Failed to create 'happy' - err = -17 Failed to initialize umid "happy", trying with a random umid NET: Registered protocol family 16 Checking host MADV_REMOVE support...MADV_REMOVE failed, err = -22 Can't release memory to the host - memory hotplug won't be supported mconsole (version 2) initialized on /home/rtrsvcs/dbahi/.uml/vyvh4O/mconsole ubd: Synchronous mode Host TLS support detected Detected host type: i386 initcall at 0x0804cc9e: __setup_host_supports_tls+0x0/0x64(): returned with error code 1
# Newer libcs don't define the JB_* jmp_buf access macros. If this is # the case, we provide values ourselves. Index: linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c =================================================================== --- linux-2.6.15.orig/arch/um/os-Linux/sys-i386/registers.c 2006-02-13 13:00:06.000000000 -0500 +++ linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c 2006-02-13 13:04:07.000000000 -0500 @@ -130,6 +130,12 @@ void get_safe_registers(unsigned long *r HOST_FP_SIZE * sizeof(unsigned long)); } +#ifndef JB_PC +#define JB_PC 5 +#define JB_SP 4 +#define JB_BP 3 +#endif + void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer) { struct __jmp_buf_tag *jmpbuf = buffer; Index: linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c =================================================================== --- linux-2.6.15.orig/arch/um/os-Linux/sys-x86_64/registers.c 2006-02-13 13:00:06.000000000 -0500 +++ linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c 2006-02-13 13:04:07.000000000 -0500 @@ -78,6 +78,12 @@ void get_safe_registers(unsigned long *r HOST_FP_SIZE * sizeof(unsigned long)); } +#ifndef JB_PC +#define JB_PC 7 +#define JB_RSP 6 +#define JB_RBP 1 +#endif + void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer) { struct __jmp_buf_tag *jmpbuf = buffer;
--- linux-2.6.17-rc1/arch/um/os-Linux/sys-i386/tls.c~ 2006-04-05 10:34:32.000000000 -0400 +++ linux-2.6.17-rc1/arch/um/os-Linux/sys-i386/tls.c 2006-04-05 10:24:46.000000000 -0400 @@ -1,4 +1,5 @@ #include <linux/unistd.h> +#include <errno.h> #include "sysdep/tls.h" #include "user_util.h"
signature.asc
Description: OpenPGP digital signature