[PATCH] D85086: [ELF] --oformat=binary: use LMA to compute file offsets

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 01:09:37 PDT 2020


psmith added a comment.

I agree with MaskRay that if we do support the feature then we should make sure it works or document its limitations, even if our limitations are "Implemented to the degree that it supports the FreeBSD Kernel, we recommend producing an ELF file and using llvm-objcopy  --output-target=binary."

FWIW the modifications here look like an improvement and are localised to a small error so no objections from me for the improvement. I'm surprised to see we don't generate Program Headers for oformat binary. I would expect us to generate but not allocate addresses or write out the ELF header or program headers to the file. I think this would be the equivalent of writing an ELF file then using objcopy on it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85086/new/

https://reviews.llvm.org/D85086



More information about the llvm-commits mailing list