this patch fixes the unresolved link time error with a conditional around the definition of CAN_KMALLOC and removes the unnedded -SEARCH_DIR line from dyn_link.ld.in (this actually gets in the way if using a non- system toolchain and it's removal should not affect any properly built toolchain). -- db D. Bahi wrote: > sorry about my own follow up - it's a trivial bug: > > rather than wrap CAN_KMALLOC with multiple macro conditionals > to avoid 'tracing_pid' being referenced i just added the line > > int tracing_pid = -1 > > to arch/um/kern/skas/process.c so that it parallels kern/tt/tracer.c > this might mask more critical references introduced in the future > however. so the multiple macro fix would be the proper one i guess... > > > D. Bahi wrote: > >> i think this has been like this for some time... as i remember >> trying to turn of TT completely in earlier releases: >> >> CONFIG_MODE_SKAS=y >> CONFIG_X86_CMPXCHG=y >> # CONFIG_MODE_TT is not set >> # CONFIG_STATIC_LINK is not set >> >> results in: >> >> gcc -Wl,-T,arch/um/dyn_link.ld -Wl,-rpath,/lib -Wl,--wrap,malloc >> -Wl,--wrap,free -Wl,--wrap,calloc \ >> -o linux arch/um/main.o vmlinux.o -L/usr/lib -lutil >> arch/um/main.o(.text+0x363): In function `__wrap_malloc': >> arch/um/main.c:187: undefined reference to `tracing_pid' >> arch/um/main.o(.text+0x3e2): In function `__wrap_free': >> arch/um/main.c:231: undefined reference to `tracing_pid' >> arch/um/main.o(.text+0x425):arch/um/main.c:235: undefined reference to >> `tracing_pid' >> collect2: ld returned 1 exit status >> make: *** [linux] Error 1 >> >> arch/um/main.c:187 is in void *__wrap_malloc(int size) >> ==> else ret = um_vmalloc(size); >> >> arch/um/main.c:231 and :235 are in void __wrap_free(void *ptr) >> ==> if(CAN_KMALLOC()) >> ==> if(CAN_KMALLOC()) >> >