From c3fb5e523797223843daae9d9e883d86682a40f7 Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 20 Dec 1999 22:29:26 +0000 Subject: [PATCH] * relocation with debug info in rva (only with internal compiler) --- compiler/og386cff.pas | 15 ++++++++++++--- compiler/pmodules.pas | 10 ++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/compiler/og386cff.pas b/compiler/og386cff.pas index e502f68101..7c64b3c261 100644 --- a/compiler/og386cff.pas +++ b/compiler/og386cff.pas @@ -606,7 +606,10 @@ unit og386cff; { when the offset is not 0 then write a relocation, take also the hdrstab into account with the offset } if reloc then - sects[sec_stab]^.addsectionreloc(sects[sec_stab]^.len-4,s,relative_false); + if DLLSource then + sects[sec_stab]^.addsectionreloc(sects[sec_stab]^.len-4,s,relative_rva) + else + sects[sec_stab]^.addsectionreloc(sects[sec_stab]^.len-4,s,relative_false); end; @@ -653,7 +656,10 @@ unit og386cff; { when the offset is not 0 then write a relocation, take also the hdrstab into account with the offset } if reloc then - sects[sec_stab]^.addsymreloc(sects[sec_stab]^.len-4,ps,relative_false); + if DLLSource then + sects[sec_stab]^.addsymreloc(sects[sec_stab]^.len-4,ps,relative_rva) + else + sects[sec_stab]^.addsymreloc(sects[sec_stab]^.len-4,ps,relative_false); end; @@ -976,7 +982,10 @@ unit og386cff; end. { $Log$ - Revision 1.15 1999-11-30 10:40:43 peter + Revision 1.16 1999-12-20 22:29:26 pierre + * relocation with debug info in rva (only with internal compiler) + + Revision 1.15 1999/11/30 10:40:43 peter + ttype, tsymlist Revision 1.14 1999/11/06 14:34:21 peter diff --git a/compiler/pmodules.pas b/compiler/pmodules.pas index 321b778a49..ce45725599 100644 --- a/compiler/pmodules.pas +++ b/compiler/pmodules.pas @@ -1334,8 +1334,11 @@ unit pmodules; IsExe:=true; parse_only:=false; { relocation works only without stabs under win32 !! PM } + { internal assembler uses rva for stabs info + so it should work with relocated DLLs } if RelocSection and - (target_info.target=target_i386_win32) then + (target_info.target=target_i386_win32) and + (target_info.assem<>as_i386_pecoff) then begin aktglobalswitches:=aktglobalswitches+[cs_link_strip]; { Warning stabs info does not work with reloc section !! } @@ -1558,7 +1561,10 @@ unit pmodules; end. { $Log$ - Revision 1.176 1999-12-10 10:02:53 peter + Revision 1.177 1999-12-20 22:29:26 pierre + * relocation with debug info in rva (only with internal compiler) + + Revision 1.176 1999/12/10 10:02:53 peter * only check relocsection for win32 Revision 1.175 1999/11/30 10:40:44 peter