[PATCH] D24830: [ELF] - Linkerscript: implemented BYTE/SHORT/LONG/QUAD commands.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 07:02:37 PDT 2016


grimar added inline comments.

================
Comment at: ELF/LinkerScript.h:146
@@ +145,3 @@
+  static bool classof(const BaseCommand *C);
+  uint64_t Data;
+  unsigned Offset;
----------------
rafael wrote:
> This could just store a StringRef or ArrayRef, no?
> 
> We can compute the correct (target endian) representation upfront and simplify the remaining code.
Not sure about StringRef/ArrayRef, that could be std::vector<uint_8t>, computed in theory, but I think I can't do it.

Problem is that readBytesDataCommand() that reads command know nothing about target endianess because is not ELFT templated.


https://reviews.llvm.org/D24830





More information about the llvm-commits mailing list