rawbytestring so the compiler does not try to convert it to the declared
string type of the function result, as this may not be available
(mantis #32510)
git-svn-id: trunk@37889 -
* compinnr.inc include file converted to a unit
* inline number field size stored in ppu increased from byte to longint
* inlines in the parse tree (when written with the -vp option) now printed with
their enum name, instead of number
git-svn-id: trunk@36174 -
code from one unit to another, but in splitting some methods
I made a couple of mistakes :/ (causing global variables to be
initialised three times)
git-svn-id: trunk@35461 -
for the InitFinalTable, because they are declared as ALUUInt in the RTL and
sinttype doesn't always correspond to the ALU size (it differs on platforms
with the combination of a 64-bit ALU and 32-bit address space)
git-svn-id: trunk@34629 -
- register a symbol in the unit's public or extern asm symbol list
- add an indirect symbol when defining the symbol
- use an indirect symbol instead of the direct one
This will be needed to correctly handle resourcestrings for packages
git-svn-id: trunk@34182 -
symbol is defined
o removed all places where AB_INDIRECT symbols were explicitly generated
o only generate AB_INDIRECT symbols for AT_DATA on systems_indirect_var_imports
o for some symbols an indirect symbol is always required (because they are
dereferenced by code in RTL units) -> use new AT_DATA_FORCEINDIRECT type
git-svn-id: trunk@34165 -
tasmdata.DefineAsmSymbol() and all routines that call it
o will be used to automatically generate AB_INDIRECT sybols when
necessary
git-svn-id: trunk@34164 -
compiler/ngenutil.pas, tnodeutils:
* InsertThreadvarTablesTable: reference a unit's (and the program's) threadvar table using a indirect symbol
* InsertThreadvars: generate an indirect symbol for the threadvar table
rtl/inc/threadvr.inc:
* TltvInitTablesTable: add an additional indirection for the tables field
git-svn-id: trunk@34043 -
Adjust non-Windows resources to work with indirect main information as well.
rtl/inc/systemh.inc, TEntryInformation:
+ new cross platform field ResLocation which stores the pointer to the resources
rtl/inc/intres.inc:
* change the type of ResHeader from PResHdr to PPResHdr (and adjust code that uses it accordingly; Note: the first dereferencing is assumed to be always valid!)
* adjust declaration of ResHeader depending on whether indirect main information is used or not
rtl/darwin/sysinit.pas & rtl/linux/si_impl.inc:
* pass the location of the resources through SysInitEntryInformation
rtl/bsd/system.pp & rtl/linux/system.pp:
+ new public variable FPCResLocation which is setup by SysEntry
rtl/win32/sysinit.inc:
* initialize ResLocation of SysInitEntryInformation as Nil
rtl/win32/system.pp:
* initialize ResLocation of EntryInformation as Nil
........
For systems that support both internal and external resources (in this case only Darwin ones) we need to generate the FPC_RESLOCATION symbol always, because the SysInit unit is resource type agnostic.
ngenutil.pas, tnodeutils:
* InsertResourceInfo: generate FPC_RESLOCATION symbol pointing to 0 in case the program is compiled on Darwin with resources set to external ones (-We)
git-svn-id: trunk@33952 -
ngenutil.pas, tnodeutils:
* InsertInitFinalTable: the init and finalize functions are in the *local* symboltable not the global one
* InsertInitFinalTable.add_initfinal_import: reenable the internal error
git-svn-id: trunk@33508 -
ngenutil.pas, tnodeutils.InsertInitFinalTable:
* add_initfinal_import: disable the internal error until I've found out why the INIT$ function isn't there
git-svn-id: trunk@33504 -
Also add the initialization/finalization sections and the class constructors/destructors to the imported symbols of the current program/library.
ngenutil.pas, tnodeutils.InsertInitFinalTable:
+ new function add_initfinal_import to find the procsym for the initialization/finalization code and to add it to the imported unit symbols
* write_struct_inits: import the found class constructor/destructor symbols if they are not in the program/library unit
* use add_initfinal_import for the initialization and finalization sections of all used units beside the program/library unit
........
git-svn-id: trunk@33501 -
Note: It needs to be checked what adjustments will need to be done for JVM and LLVM
Note 2: The indirect symbols will always be generated even if the target won't use them so that assembler code can be consistent among the targets (e.g. i386-win32 needs them while i386-linux does not)
ptconst.pas, read_typed_const:
* generate the indirect symbol in a read only data section
ngenutil.pas, tnodeutils:
* insertbsssym: generate the indirect symbol in a read only data section
git-svn-id: trunk@33279 -
accessed by a nested routine, assign it back to the original funcretsym
at the end because the code generator is hardcoded to use funcretsym.
We can't replace funcretsym with an absolutevarsym that redirects to
the parentfpstruct field, because the code generator can only handle
simple variables
git-svn-id: trunk@32687 -
const builder
o also put the resourcestring tables table in rodata instead of in data,
since it doesn't change at run time (unlike the individual resourcestring
tables)
git-svn-id: trunk@32397 -
section to the high level typed const builder, and use this functionality
for the resource strings (generating items: todo)
* fixed dead stripping unused resource strings (all string data was put in the
same section since r30342)
git-svn-id: trunk@32394 -