* coff-objfmt.c (coff_objfmt_output_expr): Try to match the new ML64's
output better by generating relocs directly to the symbol being relocated
rather than to the section. Use a new coff_objfmt->win64 flag to
conditionalize this rather than just COFF_MACHINE_AMD64.
(coff_objfmt): New win64 flag.
(coff_objfmt_create, win32_objfmt_create, win64_objfmt_create): Initialize
flag.
(coff_objfmt_output): Turn on outputting all symbols in win64 mode so they
can be referenced by relocs. This isn't quite correct: we should only turn
on the symbols that are actually used by relocs, but having them there
doesn't hurt linking; it only exposes all of the internal symbol names.
With these changes, yasm output matches the new ML64 output except for a
very few cases:
- ML64 generates REL32 relocs when referencing objects in the same .text
section. I cannot see how this is necessary because call instructions
don't generate REL32 relocs! I currently do not plan on fixing this unless
it causes a problem.
- ML64 generates ADDR32 relocs instead of REL32 relocs when loading a
32-bit register with the address of an object. I will probably try to fix
this.