Selaa lähdekoodia

* fixed linking with eVC++ object files (bug #8542).

git-svn-id: trunk@7556 -
yury 18 vuotta sitten
vanhempi
commit
73b8fba64b
1 muutettua tiedostoa jossa 8 lisäystä ja 2 poistoa
  1. 8 2
      compiler/ogcoff.pas

+ 8 - 2
compiler/ogcoff.pas

@@ -125,6 +125,9 @@ interface
        TCoffObjData = class(TObjData)
        private
          win32      : boolean;
+{$ifdef arm}
+         eVCobj     : boolean;
+{$endif arm}
        public
          constructor createcoff(const n:string;awin32:boolean;acObjSection:TObjSectionClass);
          destructor  destroy;override;
@@ -817,7 +820,7 @@ const pemagic : array[0..3] of byte = (
                   if (relocsec.objdata=objdata) then
                     dec(address,TCoffObjSection(relocsec).orgmempos);
 {$ifdef arm}
-                  if (relocsec.objdata=objdata) then
+                  if (relocsec.objdata=objdata) and not TCoffObjData(objdata).eVCobj then
                     inc(address, relocsec.MemPos)
                   else
 {$endif arm}
@@ -880,7 +883,7 @@ const pemagic : array[0..3] of byte = (
                         dec(address,TCoffObjSection(relocsec).orgmempos);
                     end;
 {$ifdef arm}
-                  if (relocsec.objdata=objdata) then
+                  if (relocsec.objdata=objdata) and not TCoffObjData(objdata).eVCobj then
                     inc(address, relocsec.MemPos)
                   else
 {$endif arm}
@@ -1763,6 +1766,9 @@ const pemagic : array[0..3] of byte = (
                InputError('Illegal COFF Magic');
                exit;
              end;
+{$ifdef arm}
+           eVCobj:=header.flag=$100;
+{$endif arm}
            { Strings }
            AReader.Seek(header.sympos+header.syms*sizeof(CoffSymbol));
            if not AReader.Read(strsize,4) then