|
@@ -1347,12 +1347,13 @@
|
|
TTYPEDCONSTSYM
|
|
TTYPEDCONSTSYM
|
|
*****************************************************************************}
|
|
*****************************************************************************}
|
|
|
|
|
|
- constructor ttypedconstsym.init(const n : string;p : pdef);
|
|
|
|
|
|
+ constructor ttypedconstsym.init(const n : string;p : pdef;really_const : boolean);
|
|
|
|
|
|
begin
|
|
begin
|
|
tsym.init(n);
|
|
tsym.init(n);
|
|
typ:=typedconstsym;
|
|
typ:=typedconstsym;
|
|
definition:=p;
|
|
definition:=p;
|
|
|
|
+ is_really_const:=really_const;
|
|
prefix:=stringdup(procprefix);
|
|
prefix:=stringdup(procprefix);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1362,6 +1363,11 @@
|
|
tsym.load;
|
|
tsym.load;
|
|
typ:=typedconstsym;
|
|
typ:=typedconstsym;
|
|
definition:=readdefref;
|
|
definition:=readdefref;
|
|
|
|
+{$ifdef DELPHI_CONST_IN_RODATA}
|
|
|
|
+ is_really_const:=boolean(readbyte);
|
|
|
|
+{$else DELPHI_CONST_IN_RODATA}
|
|
|
|
+ is_really_const:=false;
|
|
|
|
+{$endif DELPHI_CONST_IN_RODATA}
|
|
prefix:=stringdup(readstring);
|
|
prefix:=stringdup(readstring);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1400,6 +1406,9 @@
|
|
tsym.write;
|
|
tsym.write;
|
|
writedefref(definition);
|
|
writedefref(definition);
|
|
writestring(prefix^);
|
|
writestring(prefix^);
|
|
|
|
+{$ifdef DELPHI_CONST_IN_RODATA}
|
|
|
|
+ writebyte(byte(is_really_const));
|
|
|
|
+{$endif DELPHI_CONST_IN_RODATA}
|
|
current_ppu^.writeentry(ibtypedconstsym);
|
|
current_ppu^.writeentry(ibtypedconstsym);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1416,30 +1425,35 @@
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure ttypedconstsym.really_insert_in_data;
|
|
procedure ttypedconstsym.really_insert_in_data;
|
|
|
|
+ var curconstsegment : paasmoutput;
|
|
begin
|
|
begin
|
|
|
|
+ if is_really_const then
|
|
|
|
+ curconstsegment:=consts
|
|
|
|
+ else
|
|
|
|
+ curconstsegment:=datasegment;
|
|
if owner^.symtabletype=globalsymtable then
|
|
if owner^.symtabletype=globalsymtable then
|
|
begin
|
|
begin
|
|
if (cs_smartlink in aktmoduleswitches) then
|
|
if (cs_smartlink in aktmoduleswitches) then
|
|
- datasegment^.concat(new(pai_cut,init));
|
|
|
|
|
|
+ curconstsegment^.concat(new(pai_cut,init));
|
|
{$ifdef GDB}
|
|
{$ifdef GDB}
|
|
if cs_debuginfo in aktmoduleswitches then
|
|
if cs_debuginfo in aktmoduleswitches then
|
|
- concatstabto(datasegment);
|
|
|
|
|
|
+ concatstabto(curconstsegment);
|
|
{$endif GDB}
|
|
{$endif GDB}
|
|
- datasegment^.concat(new(pai_symbol,init_global(mangledname)));
|
|
|
|
|
|
+ curconstsegment^.concat(new(pai_symbol,init_global(mangledname)));
|
|
end
|
|
end
|
|
else
|
|
else
|
|
if owner^.symtabletype<>unitsymtable then
|
|
if owner^.symtabletype<>unitsymtable then
|
|
begin
|
|
begin
|
|
if (cs_smartlink in aktmoduleswitches) then
|
|
if (cs_smartlink in aktmoduleswitches) then
|
|
- datasegment^.concat(new(pai_cut,init));
|
|
|
|
|
|
+ curconstsegment^.concat(new(pai_cut,init));
|
|
{$ifdef GDB}
|
|
{$ifdef GDB}
|
|
if cs_debuginfo in aktmoduleswitches then
|
|
if cs_debuginfo in aktmoduleswitches then
|
|
- concatstabto(datasegment);
|
|
|
|
|
|
+ concatstabto(curconstsegment);
|
|
{$endif GDB}
|
|
{$endif GDB}
|
|
if (cs_smartlink in aktmoduleswitches) then
|
|
if (cs_smartlink in aktmoduleswitches) then
|
|
- datasegment^.concat(new(pai_symbol,init_global(mangledname)))
|
|
|
|
|
|
+ curconstsegment^.concat(new(pai_symbol,init_global(mangledname)))
|
|
else
|
|
else
|
|
- datasegment^.concat(new(pai_symbol,init(mangledname)));
|
|
|
|
|
|
+ curconstsegment^.concat(new(pai_symbol,init(mangledname)));
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1943,7 +1957,11 @@
|
|
|
|
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.80 1999-04-21 09:43:54 peter
|
|
|
|
|
|
+ Revision 1.81 1999-04-25 22:38:39 pierre
|
|
|
|
+ + added is_really_const booleanfield for typedconstsym
|
|
|
|
+ for Delphi in $J- mode (not yet implemented !)
|
|
|
|
+
|
|
|
|
+ Revision 1.80 1999/04/21 09:43:54 peter
|
|
* storenumber works
|
|
* storenumber works
|
|
* fixed some typos in double_checksum
|
|
* fixed some typos in double_checksum
|
|
+ incompatible types type1 and type2 message (with storenumber)
|
|
+ incompatible types type1 and type2 message (with storenumber)
|