This is https://bugs.llvm.org/show_bug.cgi?id=40005,
Patch teaches llvm-objcopy to preserve OS/ABI and ABIVersion fields of ELF header.
(Currently, it drops them to zero).
Differential D55886
[llvm-objcopy] - Do not drop the OS/ABI and ABIVersion fields of ELF header grimar on Dec 19 2018, 5:46 AM. Authored by
Details This is https://bugs.llvm.org/show_bug.cgi?id=40005, Patch teaches llvm-objcopy to preserve OS/ABI and ABIVersion fields of ELF header.
Diff Detail Event Timeline
Comment Actions LGTM, I'd like James's approval and my only comment is about a feature we can add after this if its needed. James is also out on leave so go ahead and land this.
Comment Actions LGTM. I recently tried to use llvm-objcopy for building CheriBSD (a fork of FreeBSD for the CHERI CPU) and ran into asserts due to missing ELFOSABI_FREEBSD. Comment Actions
@jakehehrlich - At the moment, no we don't have a use case for that. If we ever do, I'll either file a bug or create a review. @grimar - thanks for the fix! |
I'd like @jhenderson to comment if their use case might ever require them to specify what the OSABI and/or ABIVersion might need to be set via a flag for the BianryELFBuilder case.