mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 19:26:05 +02:00
* add ability to disable the generation of an indirect symbol if needed (useful if that's done by the constant builder)
Note: I'm not yet really happy with both AT_DATA_FORCEINDIRECT and AT_DATA_NOINDIRECT; maybe I should replace them with flags or something like that... git-svn-id: trunk@35366 -
This commit is contained in:
parent
822d96776b
commit
c1db48c8c6
@ -61,6 +61,10 @@ interface
|
||||
tables) -- never seen in an assembler/assembler writer, always
|
||||
changed to AT_DATA }
|
||||
AT_DATA_FORCEINDIRECT,
|
||||
{ don't generate an implicit indirect symbol as that might be provided
|
||||
by other means (e.g. the typed const builder) to ensure a correct
|
||||
section name }
|
||||
AT_DATA_NOINDIRECT,
|
||||
{ Thread-local symbol (ELF targets) }
|
||||
AT_TLS,
|
||||
{ GNU indirect function (ELF targets) }
|
||||
|
@ -359,7 +359,7 @@ implementation
|
||||
begin
|
||||
{ this difference is only necessary to determine whether we always need
|
||||
indirect references or not }
|
||||
if _typ=AT_DATA_FORCEINDIRECT then
|
||||
if _typ in [AT_DATA_FORCEINDIRECT,AT_DATA_NOINDIRECT] then
|
||||
_typ:=AT_DATA;
|
||||
namestr:=s;
|
||||
if _bind in asmsymbindindirect then
|
||||
|
@ -57,6 +57,7 @@ function TAsmDataDef.DefineAsmSymbolByClass(symclass: TAsmSymbolClass; const s:
|
||||
{ define the indirect asmsymbol if necessary }
|
||||
if not wasdefined and
|
||||
(_bind in [AB_GLOBAL,AB_COMMON]) and
|
||||
(_typ<>AT_DATA_NOINDIRECT) and
|
||||
(((_typ=AT_DATA) and
|
||||
(tf_supports_packages in target_info.flags) and
|
||||
(target_info.system in systems_indirect_var_imports)
|
||||
|
@ -904,6 +904,10 @@ type
|
||||
tables) -- never seen in an assembler/assembler writer, always
|
||||
changed to AT_DATA }
|
||||
AT_DATA_FORCEINDIRECT,
|
||||
{ don't generate an implicit indirect symbol as that might be provided
|
||||
by other means (e.g. the typed const builder) to ensure a correct
|
||||
section name }
|
||||
AT_DATA_NOINDIRECT,
|
||||
{ Thread-local symbol (ELF targets) }
|
||||
AT_TLS,
|
||||
{ GNU indirect function (ELF targets) }
|
||||
@ -972,8 +976,12 @@ begin
|
||||
typestr:='Label (with address taken)';
|
||||
AT_METADATA :
|
||||
typestr:='Metadata';
|
||||
{ this shouldn't appear in a PPU }
|
||||
AT_DATA_FORCEINDIRECT :
|
||||
typestr:='Data (ForceIndirect)';
|
||||
{ this shouldn't appear in a PPU }
|
||||
AT_DATA_NOINDIRECT:
|
||||
typestr:='Data (NoIndirect)';
|
||||
AT_TLS :
|
||||
typestr:='TLS';
|
||||
AT_GNU_IFUNC :
|
||||
|
Loading…
Reference in New Issue
Block a user