* Support for -WB<image_base> option in internal linker.

git-svn-id: trunk@3828 -
This commit is contained in:
yury 2006-06-09 11:08:46 +00:00
parent e80e5be980
commit fb9f8bb2a1

View File

@ -2464,14 +2464,21 @@ const win32stub : array[0..131] of byte=(
procedure TPECoffLinker.DefaultLinkScript; procedure TPECoffLinker.DefaultLinkScript;
var
ibase: string;
begin begin
with LinkScript do with LinkScript do
begin begin
Concat('READUNITOBJECTS'); Concat('READUNITOBJECTS');
if assigned(DLLImageBase) then
ibase:=DLLImageBase^
else
ibase:='';
if IsSharedLibrary then if IsSharedLibrary then
begin begin
if ibase = '' then
ibase:='10000000';
Concat('ISSHAREDLIBRARY'); Concat('ISSHAREDLIBRARY');
Concat('IMAGEBASE $10000000');
if apptype=app_gui then if apptype=app_gui then
Concat('ENTRYNAME _DLLWinMainCRTStartup') Concat('ENTRYNAME _DLLWinMainCRTStartup')
else else
@ -2484,6 +2491,8 @@ const win32stub : array[0..131] of byte=(
else else
Concat('ENTRYNAME _mainCRTStartup'); Concat('ENTRYNAME _mainCRTStartup');
end; end;
if ibase <> '' then
Concat('IMAGEBASE $' + ibase);
Concat('HEADER'); Concat('HEADER');
Concat('EXESECTION .text'); Concat('EXESECTION .text');
{$ifdef arm} {$ifdef arm}