Browse Source

* -g disables reloc section for win32

pierre 26 years ago
parent
commit
5fa01cdc9e
2 changed files with 20 additions and 4 deletions
  1. 5 1
      compiler/globals.pas
  2. 15 3
      compiler/options.pas

+ 5 - 1
compiler/globals.pas

@@ -178,6 +178,7 @@ unit globals;
 
 
     const
     const
        RelocSection : boolean = true;
        RelocSection : boolean = true;
+       RelocSectionSetExplicitly : boolean = false;
        DLLsource : boolean = false;
        DLLsource : boolean = false;
        DLLImageBase : pstring = nil;
        DLLImageBase : pstring = nil;
 
 
@@ -1350,7 +1351,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.33  1999-11-12 11:03:50  peter
+  Revision 1.34  1999-11-15 17:42:41  pierre
+   * -g disables reloc section for win32
+
+  Revision 1.33  1999/11/12 11:03:50  peter
     * searchpaths changed to stringqueue object
     * searchpaths changed to stringqueue object
 
 
   Revision 1.32  1999/11/09 23:34:46  pierre
   Revision 1.32  1999/11/09 23:34:46  pierre

+ 15 - 3
compiler/options.pas

@@ -531,6 +531,8 @@ begin
                        begin
                        begin
 {$ifdef GDB}
 {$ifdef GDB}
                          initmoduleswitches:=initmoduleswitches+[cs_debuginfo];
                          initmoduleswitches:=initmoduleswitches+[cs_debuginfo];
+                         if not RelocSectionSetExplicitly then
+                           RelocSection:=false;
                          for j:=1 to length(more) do
                          for j:=1 to length(more) do
                           case more[j] of
                           case more[j] of
                            'd' : initglobalswitches:=initglobalswitches+[cs_gdb_dbx];
                            'd' : initglobalswitches:=initglobalswitches+[cs_gdb_dbx];
@@ -712,16 +714,23 @@ begin
                                      DLLImageBase:=StringDup(Copy(More,j+1,255));
                                      DLLImageBase:=StringDup(Copy(More,j+1,255));
                                  end
                                  end
                                else
                                else
-                                 RelocSection:=true;
+                                 begin
+                                   RelocSection:=true;
+                                   RelocSectionSetExplicitly:=true;
+                                 end;
                                break;
                                break;
                              end;
                              end;
                         'C': apptype:=at_cui;
                         'C': apptype:=at_cui;
                         'G': apptype:=at_gui;
                         'G': apptype:=at_gui;
                         'N': begin
                         'N': begin
                                RelocSection:=false;
                                RelocSection:=false;
+                               RelocSectionSetExplicitly:=true;
                              end;
                              end;
 
 
-                        'R': RelocSection:=true;
+                        'R': begin
+                               RelocSection:=true;
+                               RelocSectionSetExplicitly:=true;
+                             end;
                        else
                        else
                         IllegalPara(opt);
                         IllegalPara(opt);
                        end;
                        end;
@@ -1260,7 +1269,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.35  1999-11-12 11:03:50  peter
+  Revision 1.36  1999-11-15 17:42:40  pierre
+   * -g disables reloc section for win32
+
+  Revision 1.35  1999/11/12 11:03:50  peter
     * searchpaths changed to stringqueue object
     * searchpaths changed to stringqueue object
 
 
   Revision 1.34  1999/11/09 23:06:45  peter
   Revision 1.34  1999/11/09 23:06:45  peter