Hello.
I am able to use -
k-pie -k-znow -Cg for all my projects thanks to fpc 3.3.1. and create a
pie executable.
But in a project that uses
asm code there is that error at linking:
Generating PIC, but reference is not PIC-safe
This point to 2 asm lines:
procedure teefo.MemWD;
var
f : byte;
begin
gev.wd := 0;
for f := 0 to 6 do if ListWD[f] then gev.wd := gev.wd or (1 shl f);
if tun.engtrue_calend_fmt then begin
asm
push ax
mov al, gev.wd // This line point to gev.wd
mov ah, al
and al, Byte(1{bit1})
shl al, 7
or ah, al
ror ah, 1
mov gev.wd, ah // This line point to gev.wd
pop ax
end;
end;
end;
If, for workaround, those 2 lines are commented, the compilation + link is ok.
Sadly my asm knowledge are too poor and I dont see how to fix it.
Does somebody have a idea?
Thanks.
Fre;D