* msdos: Fixed section based smartlinking after my recent changes.

git-svn-id: trunk@46504 -
This commit is contained in:
yury 2020-08-20 11:20:10 +00:00
parent 9a01bcf3dc
commit 5d0e1dbe5a

View File

@ -101,15 +101,18 @@ implementation
****************************************************************************} ****************************************************************************}
procedure tmsdostai_typedconstbuilder.add_link_ordered_symbol(sym: tasmsymbol; const secname: TSymStr); procedure tmsdostai_typedconstbuilder.add_link_ordered_symbol(sym: tasmsymbol; const secname: TSymStr);
begin
if (tf_smartlink_library in target_info.flags) and is_smartlink_vectorized_dead_strip then
begin begin
with current_module.linkorderedsymbols do with current_module.linkorderedsymbols do
if (Last=nil) or (TCmdStrListItem(Last).Str<>secname) then if (Last=nil) or (TCmdStrListItem(Last).Str<>secname) then
current_module.linkorderedsymbols.concat(secname); current_module.linkorderedsymbols.concat(secname);
end; end;
end;
class function tmsdostai_typedconstbuilder.get_vectorized_dead_strip_custom_section_name(const basename: TSymStr; st: tsymtable; options: ttcasmlistoptions; out secname: TSymStr): boolean; class function tmsdostai_typedconstbuilder.get_vectorized_dead_strip_custom_section_name(const basename: TSymStr; st: tsymtable; options: ttcasmlistoptions; out secname: TSymStr): boolean;
begin begin
result:=is_smartlink_vectorized_dead_strip; result:=(tf_smartlink_library in target_info.flags) and is_smartlink_vectorized_dead_strip;
if not result then if not result then
exit; exit;
if tcalo_vectorized_dead_strip_start in options then if tcalo_vectorized_dead_strip_start in options then
@ -126,9 +129,9 @@ implementation
class function tmsdostai_typedconstbuilder.is_smartlink_vectorized_dead_strip: boolean; class function tmsdostai_typedconstbuilder.is_smartlink_vectorized_dead_strip: boolean;
begin begin
{$ifdef USE_LINKER_WLINK} {$ifdef USE_LINKER_WLINK}
result:=true; result:=inherited or (tf_smartlink_library in target_info.flags);
{$else} {$else}
result:=not (cs_link_extern in current_settings.globalswitches); result:=inherited and not (cs_link_extern in current_settings.globalswitches);
{$endif USE_LINKER_WLINK} {$endif USE_LINKER_WLINK}
end; end;