[PATCH] D21995: [ELF] Implement minimal PHDRS parser and section-to-segment assignment

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 07:33:19 PDT 2016


evgeny777 added inline comments.

================
Comment at: ELF/LinkerScript.cpp:286
@@ +285,3 @@
+  ssize_t RelroNum = -1;
+  Phdr *Load = nullptr;
+  uintX_t Flags = PF_R;
----------------
grimar wrote:
> evgeny777 wrote:
> > Well, ErrorOr<T> looks a way too heavy to represent valid/invalid array index, doesn't it?
> > 
> Right. That is why I suggested to use int32_t/uint32_t depending on what you need here. It is what we generally use in lld for such cases.
> But we do not use int and never used ssize_t yet I think.
There is plenty of int and plenty of size_t. Unfortunately I don't know any windows analog for 'grep -w', so just beleive me :)
Yes, there isn't any ssize_t, right, but on the other hand - why not use it?


http://reviews.llvm.org/D21995





More information about the llvm-commits mailing list