Linker-Plugin-LTO encodes wrong OS ABI in the ELF header #73606
Labels
A-linkage
Area: linking into static, shared libraries and binaries
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I am working on the library operating system RustyHermit. If I enable LTO support, I have to use the Linker-Plugin-LTO, because parts of the kernel are provided as static library. Unfortunately, the final result uses in the ELF file a wrong byte to define the OS ABI. In my case, it encodes the byte of the host operating system.
In our case. the binary should encode that the application is able run standalonen. According to the ELF standard
0xff
must be coded. If I disable LTO, the file uses the correct value for the OS ABI.Besides this issue, the file is correct. If I change the OS ABI with
elfedit
, the applicationsruns correctly.Does anyone have an idea what this might be caused to?
The text was updated successfully, but these errors were encountered: