[PATCH] [LLD] Add a new PE/COFF port
David Majnemer
david.majnemer at gmail.com
Tue May 26 18:56:16 PDT 2015
================
Comment at: COFF/InputFiles.cpp:242
@@ +241,3 @@
+
+ uint16_t TypeInfo = read16le(Buf + offsetof(ImportHeader, TypeInfo));
+ int Type = TypeInfo & 0x3;
----------------
pcc wrote:
> Here (and in a few other places) you are making assumptions about the host system's data layout. This may be a largely theoretical problem though.
I agree. I think the right fix is to add a `coff_import_header` to llvm/Object/COFF.h and `reinterpret_cast` the `Buf`.
http://reviews.llvm.org/D10036
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list