* Restored relocs generation for dlls by internal linker. It fixes bug #9048.

* It is possible to generate relocs for exe with internal linker using -WB switch.

git-svn-id: trunk@7743 -
This commit is contained in:
yury 2007-06-20 15:47:10 +00:00
parent 2700c4eeb0
commit 38b8731ba0
2 changed files with 3 additions and 3 deletions

View File

@ -2355,7 +2355,7 @@ implementation
break;
end;
end;
if doremove then
if doremove and not (RelocSection and (exesec.Name='.reloc')) then
begin
Comment(V_Debug,'Deleting empty section '+exesec.name);
ExeSectionList[i]:=nil;

View File

@ -2517,12 +2517,12 @@ const pemagic : array[0..3] of byte = (
i,j,k,offset : longint;
w: word;
begin
if not IsSharedLibrary then
if not RelocSection then
exit;
exesec:=FindExeSection('.reloc');
if exesec=nil then
exit;
objsec:=internalObjData.createsection('.reloc',0,exesec.SecOptions);
objsec:=internalObjData.createsection('.reloc',0,exesec.SecOptions+[oso_data]);
exesec.AddObjSection(objsec);
pgaddr:=-1;
hdrpos:=-1;