Hi!

Am 18.11.2015 um 14:32 schrieb Lorenzo Colitti:
> On Wed, Nov 18, 2015 at 5:06 PM, Richard Weinberger <rich...@nod.at> wrote:
>>
>>> That command line doesn't work, but if you remove the -lrt and put it
>>> at the end of the line, it starts working. Is the order significant?
>>> Or is it a bug in GCC's command line parsing?
>>
>> The order matters.
>> -lrt has to be placed after all object files which need the rt library.
>> Can you double check whether this is the case?
> 
> No, it's not the case. The error is when linking arch/um/os-Linux/built-in.o:
> 
> arch/um/os-Linux/built-in.o: In function `os_timer_create':
> /android/kernel/android/arch/um/os-Linux/time.c:51: undefined
> reference to `timer_create'
> 
> and in the generated command line, -lrt appears
> beforearch/um/os-Linux/built-in.o:
> 
> + gcc -Wl,-rpath,/lib64 -m64 -Wl,-rpath,/lib -Wl,--wrap,malloc
> -Wl,--wrap,free -Wl,--wrap,calloc -Wl,-m -Wl,elf_x86_64 -lrt -o
> .tmp_vmlinux1 -Wl,-T,./arch/um/kernel/vmlinux.lds init/built-in.o
> -Wl,--start-group usr/built-in.o arch/um/kernel/built-in.o
> arch/um/drivers/built-in.o arch/um/os-Linux/built-in.o
> arch/x86/crypto/built-in.o arch/x86/um/built-in.o kernel/built-in.o
> certs/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o
> security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a
> lib/built-in.o drivers/built-in.o sound/built-in.o firmware/built-in.o
> net/built-in.o virt/built-in.o -Wl,--end-group -lutil
> 
> Taking -lrt out of arch/um/Makefile and putting it into
> link-vmlinux.sh, as per the patch I suggested above, results in -lrt
> being the last thing on the command line, after -lutil.
> 

Okay, please send a proper patch. :-)

Thanks,
//richard

------------------------------------------------------------------------------
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to