[PATCH] D23769: [ELF] - Implemented --oformat binary option.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 24 04:04:44 PDT 2016


ruiu added inline comments.

================
Comment at: ELF/Writer.cpp:1071-1072
@@ -1056,5 +1070,4 @@
 template <class ELFT> void Writer<ELFT>::assignAddresses() {
   uintX_t VA = Config->ImageBase + Out<ELFT>::ElfHeader->getSize() +
                Out<ELFT>::ProgramHeaders->getSize();
   uintX_t ThreadBssOffset = 0;
----------------
It seems to me that

  uintX_t VA = Config->ImageBase;
  if (!OFormatBinary)
    VA += Out<ELFT>::ElfHeader->getSize() +
               Out<ELFT>::ProgramHeaders->getSize();

is easier to understand.


https://reviews.llvm.org/D23769





More information about the llvm-commits mailing list