From a3d82fd80f0fe1938a956a6946490872ab7da04d Mon Sep 17 00:00:00 2001 From: Tomas Hajny Date: Tue, 24 Aug 2004 19:31:44 +0000 Subject: [PATCH] * binary writer fix for GO32v2 from Peter --- compiler/assemble.pas | 7 ++++++- compiler/ogcoff.pas | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/compiler/assemble.pas b/compiler/assemble.pas index a535ebd446..6a4b5e65bc 100644 --- a/compiler/assemble.pas +++ b/compiler/assemble.pas @@ -1039,6 +1039,8 @@ Implementation not SmartAsm then begin objectdata.allocsymbol(currpass,Tai_datablock(hp).sym,Tai_datablock(hp).size); + { common/external uses the size for address } + Tai_datablock(hp).sym.address:=Tai_datablock(hp).size; { force to be common/external, must be after setaddress as that would set it to AB_GLOBAL } Tai_datablock(hp).sym.currbind:=AB_COMMON; @@ -1629,7 +1631,10 @@ Implementation end. { $Log$ - Revision 1.71 2004-07-01 18:28:54 jonas + Revision 1.72 2004-08-24 19:31:44 hajny + * binary writer fix for GO32v2 from Peter + + Revision 1.71 2004/07/01 18:28:54 jonas + detect assembler errors when using -ap Revision 1.70 2004/07/01 15:42:53 peter diff --git a/compiler/ogcoff.pas b/compiler/ogcoff.pas index 153e0f4170..afdaaa8796 100644 --- a/compiler/ogcoff.pas +++ b/compiler/ogcoff.pas @@ -605,7 +605,9 @@ const go32v2stub : array[0..2047] of byte=( curraddr:=currsec.mempos+currsec.datasize; { real address of the symbol } symaddr:=p.address; - if p.section<>nil then + { external/common symbols don't have a fixed memory position yet } + if (p.section<>nil) and + (p.currbind<>AB_COMMON) then inc(symaddr,p.section.mempos); { no symbol relocation need inside a section } if (p.section=currsec) and @@ -1784,7 +1786,10 @@ initialization end. { $Log$ - Revision 1.29 2004-06-20 08:55:30 florian + Revision 1.30 2004-08-24 19:31:44 hajny + * binary writer fix for GO32v2 from Peter + + Revision 1.29 2004/06/20 08:55:30 florian * logs truncated Revision 1.28 2004/06/16 20:07:09 florian