Displaying 2 results from an estimated 2 matches for "elf_x86".
Did you mean:
elf_i386
2020 May 14
2
ld.lld ignoring --sysroot
...> I'm trying to compile a Linux hello world executable on macOS.
>>
>> The first step is simple:
>>
>> clang -c -target x86_64-linux-gnu -c -o hello.o hello.c
>>
>> But linking results in an error:
>>
>> ld.lld --sysroot=/linuxroot/ -o hello -m elf_x86_64 \
>> -dynamic-linker /lib64/ld-linux-x86-64.so.2 \
>> /lib/crt1.o \
>> /usr/lib/x86_64-linux-gnu/crti.o ../hello.o \
>> /usr/lib/x86_64-linux-gnu/libc.so \
>> /usr/lib/x86_64-linux-gnu/crtn.o
>>
>> ld.lld: error: cannot open /lib/crt1.o: No suc...
2020 May 14
2
ld.lld ignoring --sysroot
Hello,
I'm trying to compile a Linux hello world executable on macOS.
The first step is simple:
clang -c -target x86_64-linux-gnu -c -o hello.o hello.c
But linking results in an error:
ld.lld --sysroot=/linuxroot/ -o hello -m elf_x86_64 \
-dynamic-linker /lib64/ld-linux-x86-64.so.2 \
/lib/crt1.o \
/usr/lib/x86_64-linux-gnu/crti.o ../hello.o \
/usr/lib/x86_64-linux-gnu/libc.so \
/usr/lib/x86_64-linux-gnu/crtn.o
ld.lld: error: cannot open /lib/crt1.o: No such file or directory
ld.lld: error: cannot open /usr/lib/x86_64...