[all-commits] [llvm/llvm-project] 9f9a08: [obj2yaml] - Program headers: simplify the computa...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Fri Apr 24 05:23:49 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f9a08e19c4b617d7d77754a8ebc2a0169760df5
      https://github.com/llvm/llvm-project/commit/9f9a08e19c4b617d7d77754a8ebc2a0169760df5
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-04-24 (Fri, 24 Apr 2020)

  Changed paths:
    M llvm/lib/ObjectYAML/ELFEmitter.cpp
    M llvm/test/tools/yaml2obj/ELF/program-header-size-offset.yaml

  Log Message:
  -----------
  [obj2yaml] - Program headers: simplify the computation of p_filesz.

Currently we have computations of `p_filesz` and `p_memsz` mixed together
with the use of a loop over fragments. After recent changes it is possible to
avoid using a loop for the computation of `p_filesz`, since we know that fragments
are sorted by their file offsets.

The main benefit of this change is that splits the computation of `p_filesz`
and `p_memsz` what is simpler and allows us to fix the computation of the
`p_memsz` independently (D78005 shows the issue that we have currently).

Differential revision: https://reviews.llvm.org/D78628




More information about the All-commits mailing list