[PATCH] D25330: [ELF] Remove empty PT_LOAD being created for program headers.

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 6 10:46:34 PDT 2016


rafael accepted this revision.
rafael added a comment.
This revision is now accepted and ready to land.

LGTM with nits.



> LinkerScript.cpp:659
> +  } else if (!FirstPTLoad->First) {
> +    // Remove empty PT_LOAD and update size of ProgramHeaders.
> +    Phdrs.erase(FirstPTLoad);

Expand the comment  a bit with the explanation you have on the description.

> empty-load.s:10
> +# CHECK-NEXT:     filesz
> +# CHECK-NEXT:  LOAD
> +# CHECK-NEXT:     filesz

Check the flags (rw/rx) too.

Repository:
  rL LLVM

https://reviews.llvm.org/D25330





More information about the llvm-commits mailing list