[PATCH] D11074: LLD: COFF: Infer machine type earlier than before.

Rui Ueyama ruiu at google.com
Thu Jul 9 11:21:33 PDT 2015


ruiu created this revision.
ruiu added a reviewer: pcc.
ruiu added a subscriber: llvm-commits.

Previously, we infer machine type at the very end of linking after
all symbols are resolved. That's actually too late because machine
type affects how we mangle symbols (whether or not we need to
add "_").

For example, /entry:foo adds "_foo" to the symbol table if x86 but
"foo" if x64.

This patch moves the code to infer machine type, so that machine
type is inferred based on input files given via the command line
(but not based on .directives files).

http://reviews.llvm.org/D11074

Files:
  COFF/Driver.cpp
  COFF/InputFiles.cpp
  COFF/InputFiles.h
  COFF/SymbolTable.h
  COFF/Writer.cpp
  test/COFF/Inputs/machine-x64.yaml
  test/COFF/Inputs/machine-x86.yaml
  test/COFF/hello32.test
  test/COFF/machine.test
  test/COFF/reloc-x86.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11074.29363.patch
Type: text/x-patch
Size: 17200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150709/4cc43503/attachment.bin>


More information about the llvm-commits mailing list