[PATCH] D78005: [yaml2obj] - Reimplement how tool calculates memory sizes of segments.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 01:34:52 PDT 2020


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: llvm/test/tools/yaml2obj/ELF/program-header-nobits.yaml:16
+# COMMON-NEXT:   [ 1] .nobits1   NOBITS   0000000200000000 000158 000010
+# COMMON-NEXT:   [ 2] .progbits1 PROGBITS 0000000200000010 000158 000001
+# COMMON-NEXT:   [ 3] .progbits2 PROGBITS 0000000200000020 000160 000010
----------------
jhenderson wrote:
> I was initially concerned that .progbits1 and .nobits1 share the same file offset. In such a case, the loader would not allocate the bytes for .nobits1 in the right place for any segment where it wasn't the only section in it. However, this is yaml2obj, not the linker, so it's probably fine to leave as-is, if there's some way of adding padding between the two sections without changing the address of .progbits1.
>  if there's some way of adding padding between the two sections without changing the address of .progbits1.
The best way I know is D78927.


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

https://reviews.llvm.org/D78005





More information about the llvm-commits mailing list