You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 24, 2021. It is now read-only.
This little program compiles with the x86_64-hermit-g++ compiler, and runs fine on the proxy.
But when I try to compile this code to a .o file using clang, and then link it with x86_64-hermit-g++, I get the following error :
$ clang -c hello.cpp
$ /opt/hermit/bin/x86_64-hermit-g++ -o hello hello.o
/opt/hermit/lib/gcc/x86_64-hermit/6.3.0/../../../../x86_64-hermit/bin/ld: hello.o: Relocations in generic ELF (EM: 62)
/opt/hermit/lib/gcc/x86_64-hermit/6.3.0/../../../../x86_64-hermit/bin/ld: hello.o: Relocations in generic ELF (EM: 62)
/opt/hermit/lib/gcc/x86_64-hermit/6.3.0/../../../../x86_64-hermit/bin/ld: hello.o: Relocations in generic ELF (EM: 62)
/opt/hermit/lib/gcc/x86_64-hermit/6.3.0/../../../../x86_64-hermit/bin/ld: hello.o: Relocations in generic ELF (EM: 62)
/opt/hermit/lib/gcc/x86_64-hermit/6.3.0/../../../../x86_64-hermit/bin/ld: hello.o: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
I'm not sure about what means "file in wrong format" here. I read on the internet that this error could be related to a .o compiled for ARM architecture, while we're trying to link it into a x86 binary executable for example. But I think it's not the case here, since I'm compiling for the same architecture. file command shows that the .o is compiled for the correct architecture (I think ?) :
$ file hello.o
hello.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
Is there something that prevent us from using the hermit toolchain only for linking everything ?