]> granicus.if.org Git - yasm/commit
Revert [1251]. From further investigation, ML64's generation of REL32 in
authorPeter Johnson <peter@tortall.net>
Sat, 1 Oct 2005 05:47:54 +0000 (05:47 -0000)
committerPeter Johnson <peter@tortall.net>
Sat, 1 Oct 2005 05:47:54 +0000 (05:47 -0000)
commita43f40ebf32d15bc4bf7a0054f14319ada8b4b43
tree016c75cf9e2e747da0c9c4eb8289e9e2357c1a88
parentfc6e94054e0134c5313b7206d93b40c58ea1521b
Revert [1251].  From further investigation, ML64's generation of REL32 in
these cases seems to be a bug.  If you get a linker error about ADDR32, it
means you aren't using RIP-relative instructions.  Note this means to access
an array you need to do:
  lea rax, [var wrt rip] ; generates RIP-relative insn and REL32 reloc
  mov rcx, [rax+rbx]     ; rbx is index
and not:
  mov rcx, [var+rbx]     ; generates ADDR32 reloc
At least when trying to build a DLL (the ADDR32 reloc fails the DLL link).
When building statically, ADDR32 should work okay and thus the latter form
can be used.

svn path=/trunk/yasm/; revision=1257
libyasm/bytecode.c
libyasm/bytecode.h
modules/objfmts/coff/coff-objfmt.c
modules/objfmts/win64/tests/win64-dataref.hex