mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 11:26:33 +02:00
* Always strip DLLs when external linker (LD) is used.
git-svn-id: trunk@7840 -
This commit is contained in:
parent
62b6fcead8
commit
4cc9bcd526
@ -1211,12 +1211,14 @@ implementation
|
|||||||
RelocSection:=true;
|
RelocSection:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ relocation works only without stabs under win32 !! PM }
|
{ Relocation works only without stabs under Windows when }
|
||||||
{ internal assembler uses rva for stabs info
|
{ external linker (LD) is used. LD generates relocs for }
|
||||||
so it should work with relocated DLLs }
|
{ stab sections which is not loaded in memory. It causes }
|
||||||
|
{ AV error when DLL is loaded and relocation is needed. }
|
||||||
|
{ Internal linker does not have this problem. }
|
||||||
if RelocSection and
|
if RelocSection and
|
||||||
(target_info.system in [system_i386_win32,system_i386_wdosx]) and
|
(target_info.system in system_all_windows+[system_i386_wdosx]) and
|
||||||
(target_info.assem<>as_i386_pecoff) then
|
(cs_link_extern in current_settings.globalswitches) then
|
||||||
begin
|
begin
|
||||||
include(current_settings.globalswitches,cs_link_strip);
|
include(current_settings.globalswitches,cs_link_strip);
|
||||||
{ Warning stabs info does not work with reloc section !! }
|
{ Warning stabs info does not work with reloc section !! }
|
||||||
@ -1227,7 +1229,6 @@ implementation
|
|||||||
exclude(current_settings.moduleswitches,cs_debuginfo);
|
exclude(current_settings.moduleswitches,cs_debuginfo);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ get correct output names }
|
{ get correct output names }
|
||||||
main_file := current_scanner.inputfile;
|
main_file := current_scanner.inputfile;
|
||||||
while assigned(main_file.next) do
|
while assigned(main_file.next) do
|
||||||
|
Loading…
Reference in New Issue
Block a user