Hello,
I got some problems with the error mentioned in the title when having relocations generated.
With version 1.69.52 the following code still worked:
format PE GUI
entry start
include 'win32a.inc'
section '.code' code readable executable
start:
lea eax,[data_stuff-start] ; works
lea eax,[data_stuff-.other_label] ; works
add eax,data_stuff-start ; works
.other_label:
push 0
call [ExitProcess]
data_stuff:
section '.data' data readable writeable
rd 1
section '.idata' import data readable
library kernel32,'KERNEL32.DLL'
import kernel32,\
ExitProcess,'ExitProcess'
section '.reloc' fixups data readable discardable
with version 1.71.05 it looks like this:
lea eax,[data_stuff-start] ; invalid use of symbol
lea eax,[data_stuff-.other_label] ; works
add eax,data_stuff-start ; works
And another question regarding relocatable addresses:
is a virtual-directive evaluated directly or when used?
because since v1.71.02 the difference between two relocatable addresses can be calculated by first subtracting, then adding, so I tried the following which sadly doesn't work:
start:
virtual at eax-data_stuff ; invalid use of symbol
.x:
end virtual
lea eax,[.x+.other_label]
.other_label:
push 0
call [ExitProcess]
data_stuff: