nasm/test/reldef.asm
H. Peter Anvin 472a7c1d17 Allow relative references to external symbols in data
Allow constructs like:

      dd foo - $

... where foo is an external symbol.  Currently this is only
implemented for extops, i.e. dx opcodes.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-10-31 08:44:25 -07:00

10 lines
85 B
NASM

bits 64
extern bar
section .data
foo: dd bar
dd foo - $
; dd foo*2
dd bar - $