[PATCH] [LLD] Add a new PE/COFF port

Rui Ueyama ruiu at google.com
Tue May 26 20:00:34 PDT 2015


Peter,

Thank you for the patch. I applied that to my local copy. Will upload a new
patch.

On Tue, May 26, 2015 at 6:47 PM, Peter Collingbourne <peter at pcc.me.uk>
wrote:

> Clang build fixes: F533032: clang.diff <http://reviews.llvm.org/F533032>
>
>
> ================
> Comment at: COFF/InputFiles.cpp:242
> @@ +241,3 @@
> +
> +  uint16_t TypeInfo = read16le(Buf + offsetof(ImportHeader, TypeInfo));
> +  int Type = TypeInfo & 0x3;
> ----------------
> 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.
>

Updated to use coff_import_header instead of ImportHeader.


> ================
> Comment at: COFF/SymbolTable.cpp:88
> @@ +87,3 @@
> +      if (!isa<Defined>(Sym->Body)) {
> +        llvm::errs() << "undefined symbol: " << Undef->getName() << "\n";
> +        Ret = true;
> ----------------
> Should this diagnose that `Undef` is undefined because `Sym->Body` is
> undefined?
>

Yes. Added a comment.


> ================
> Comment at: test/COFF/driver.test:3
> @@ +2,3 @@
> +# RUN: FileCheck -check-prefix=MISSING %s < %t.log
> +MISSING: nosuchfile.obj: no such file or directory
> +
> ----------------
> On Linux this reads "nosuchfile.obj: No such file or directory" (capital
> N).
>

Fixed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150526/20e1ad7f/attachment.html>


More information about the llvm-commits mailing list