[PATCH] D25549: [ELF] - Linkerscript: accept integer values for PHDRS types.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 14 05:55:59 PDT 2016


grimar added inline comments.


================
Comment at: ELF/LinkerScript.cpp:1711-1714
+  unsigned Ret;
+  uint64_t Val;
+  if (readInteger(Tok, Val))
+    Ret = Val;
----------------
ruiu wrote:
> Just return Ret here.
> 
>   if (readInteger(Tok, Ret))
>     return Ret;
readInteger() takes uint64, so looks better to have Val also.


================
Comment at: test/ELF/linkerscript/phdrs.s:52
+# RUN: echo "PHDRS {text PT_LOAD FILEHDR PHDRS; \
+# RUN:       foo1 11223344; foo2 0x11223344; foo3 0x112233440000; } \
+# RUN:       SECTIONS { . = SIZEOF_HEADERS; .foo : { *(.*) } : text : foo1}" > %t1.script
----------------
ruiu wrote:
> I don't see a reason to have three test cases here. One pattern should suffice.
Ok.


https://reviews.llvm.org/D25549





More information about the llvm-commits mailing list