so instead of just my usual whining attached is a suggested fix ;) D. Bahi wrote: > i'm trying to build an 'uptodate' UML guest and see exactly this > 'undefined reference to indirect_set_thread_area' (reported in November) > with 2.6.15 and all the incrementals from the patch tarball for > 2006-01-08 on user-mode-linux.sf.net. > > the comment related to this patch says CONFIG_MODE_ TT 'off' ... but > this email says try it 'on' and that just leads to: > > CC arch/um/os-Linux/tls.o > arch/um/os-Linux/tls.c:48: error: syntax error before "get_thread_area" > arch/um/os-Linux/tls.c:48: warning: type defaults to `int' in > declaration of `_syscall1' > arch/um/os-Linux/tls.c:48: warning: function declaration isn't a prototype > arch/um/os-Linux/tls.c:48: warning: data definition has no type or > storage class > arch/um/os-Linux/tls.c:49: error: syntax error before "set_thread_area" > arch/um/os-Linux/tls.c:49: warning: type defaults to `int' in > declaration of `_syscall1' > arch/um/os-Linux/tls.c:49: warning: function declaration isn't a prototype > arch/um/os-Linux/tls.c:49: warning: data definition has no type or > storage class > arch/um/os-Linux/tls.c:51: warning: "struct user_desc" declared inside > parameter list > arch/um/os-Linux/tls.c:51: warning: its scope is only this definition or > declaration, which is probably not what you want > arch/um/os-Linux/tls.c: In function `do_set_thread_area_tt': > arch/um/os-Linux/tls.c:55: warning: implicit declaration of function > `set_thread_area' > arch/um/os-Linux/tls.c: At top level: > arch/um/os-Linux/tls.c:62: warning: "struct user_desc" declared inside > parameter list > arch/um/os-Linux/tls.c: In function `do_get_thread_area_tt': > arch/um/os-Linux/tls.c:66: warning: implicit declaration of function > `get_thread_area' > make[1]: *** [arch/um/os-Linux/tls.o] Error 1 > > > Blaisorblade wrote: > >> On Friday 18 November 2005 09:59, Rob Landley wrote: >> >> >>> On Friday 18 November 2005 01:58, Blaisorblade wrote: >>> >>> >>>>> arch/um/sys-i386/built-in.o(.text+0x3b60): In function `load_TLS': >>>>> : undefined reference to `indirect_set_thread_area' >>>>> >>>>> collect2: ld returned 1 exit status >>>>> KSYM .tmp_kallsyms1.S >>>>> nm: '.tmp_vmlinux1': No such file >>>>> No valid symbol. >>>>> make[2]: *** [.tmp_kallsyms1.S] Error 1 >>>>> make[1]: *** [_all] Error 2 >>>>> make: *** [all] Error 2 >>>>> >>>>> This is progress! >>>>> >>>>> >>>> Disable TT mode or play with such things IIRC >>>> >>>> >>> Nope, tt mode already is disabled. >>> >>> >> Be creative - enable it then... yep, indirect_... is defined only when TT is >> active, but is also used otherwise. >> >> >> >>>> - actually there's a proper >>>> fix along lines of "move #ifdef's inside sys-i386/tls.c to properly cater >>>> to dependencies" if you want. >>>> >>>> This comes from the TLS patches btw... >>>> >>>> >> >> >>> I'll be banging on this more in a bit... >>> >>> >> >> >>> Rob >>> >>> >> >> > >
--- linux-2.6.15/arch/um/sys-i386/tls.c~ 2006-01-11 20:04:35.528386774 -0500 +++ linux-2.6.15/arch/um/sys-i386/tls.c 2006-01-11 20:05:45.600027039 -0500 @@ -134,7 +134,7 @@ int load_TLS(int flags, struct task_stru if (!(flags & O_FORCE) && curr->flushed) continue; - ret = (flags & O_INDIRECT) ? indirect_set_thread_area(&curr->tls): do_set_thread_area(&curr->tls); + ret = CHOOSE_MODE_PROC( indirect_set_thread_area, do_set_thread_area, &curr->tls ); if (ret) goto out;
signature.asc
Description: OpenPGP digital signature