[PATCH] D67325: [ELF] Map the ELF header at imageBase
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 21:26:55 PDT 2019
MaskRay added inline comments.
================
Comment at: ELF/LinkerScript.cpp:1011
+// When the SECTIONS command is used, try to find an address for the file and
+// program headers output sections, which were unconditionally added to the
+// first PT_LOAD segment earlier.
----------------
peter.smith wrote:
> From a double check, it seems like unconditional isn't true any more. In createPhdrs() nmagic and omagic don't add the ELF Headers into the loadable segment, looks like I missed updating the comment when adding omagic and nmagic.
>
> Perhaps update the comment to:
>
> ```
> // When the SECTIONS command is used, try to find an address for the file and
> // program headers output sections, which can be added to the first PT_LOAD segment
> // when program headers are created.
> ```
> t seems like unconditional isn't true any more. In createPhdrs() nmagic and omagic don't add the ELF Headers into the loadable segment
nmagic and omagic were changed in D67324.
Applied the suggested comments.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67325/new/
https://reviews.llvm.org/D67325
More information about the llvm-commits
mailing list