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 has been 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 ?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello.
For evaluation purpose, I would like to compile an application with clang compiler, and let the hermit toolchain link the compiled files correctly.
To show you my problem, I try to compile a simple C++ hello world application :
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 withx86_64-hermit-g++
, I get the following error :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 ?) :Is there something that prevent us from using the hermit toolchain only for linking everything ?
The text was updated successfully, but these errors were encountered: