6.2.1 Mangled names for data blocks

The rules for mangled names for variables and typed constants are as follows:

Examples:

unit testvars;

interface

const
 publictypedconst : integer = 0;
var
 publicvar : integer;

implementation
const
 privatetypedconst : integer = 1;
var
 privatevar : integer;

end.

Will result in the following assembler code for the gnu assembler :

.file "testvars.pas"

.text

.data
# [6] publictypedconst : integer = 0;
.globlTC__TESTVARS$$_PUBLICTYPEDCONST
TC__TESTVARS$$_PUBLICTYPEDCONST:
.short0
# [12] privatetypedconst : integer = 1;
TC__TESTVARS$$_PRIVATETYPEDCONST:
.short1

.bss
# [8] publicvar : integer;
.commU_TESTVARS_PUBLICVAR,2
# [14] privatevar : integer;
.lcomm_PRIVATEVAR,2