Browse Source

* bind_win32_dll removed (Relocsection used instead)
* now relocsection is true by default ! (needs dlltool
for DLL generation)

pierre 26 years ago
parent
commit
d85a8886fd
4 changed files with 44 additions and 10 deletions
  1. 17 4
      compiler/globals.pas
  2. 9 2
      compiler/link.pas
  3. 8 2
      compiler/options.pas
  4. 10 2
      compiler/pexports.pas

+ 17 - 4
compiler/globals.pas

@@ -163,11 +163,19 @@ unit globals;
        apptype : tapptype;
 
     const
-       RelocSection : boolean = false;
+       RelocSection : boolean = true;
        DLLsource : boolean = false;
        { no binding needed for win32
-         .edata written directly !! PM }
-       bind_win32_dll : boolean = false;
+         .edata written directly !! PM
+         so use RelocSection here also
+       bind_win32_dll : boolean = false;}
+       {  WARNING !!!!!
+         without relocation a DLL cannot beloaded at any
+         address but the base address written into the
+         PE header !!!
+         So DLL's should allways be compiled with relocation (PM)
+         Thanks to Pavel Ozerski for explaining me that
+       }
 
        { should we allow non static members ? }
        allow_only_static : boolean = false;
@@ -1231,7 +1239,12 @@ begin
 end.
 {
   $Log$
-  Revision 1.16  1999-08-05 20:54:19  daniel
+  Revision 1.17  1999-08-10 12:51:14  pierre
+    * bind_win32_dll removed (Relocsection used instead)
+    * now relocsection is true by default ! (needs dlltool
+      for DLL generation)
+
+  Revision 1.16  1999/08/05 20:54:19  daniel
   * Changes for new symtable.
 
   Revision 1.15  1999/08/03 17:09:35  florian

+ 9 - 2
compiler/link.pas

@@ -83,6 +83,7 @@ uses
 {$ifdef linux}
   ,linux
 {$endif}
+  ,gendef
   ;
 
 {$ifndef linux}
@@ -606,7 +607,8 @@ begin
   success:=DoExec(FindLinker,s,true,false);
 {Bind}
   if (target_link.bindbin[1]<>'') and
-     ((target_info.target<>target_i386_win32) or bind_win32_dll) then
+     ((target_info.target<>target_i386_win32) or
+     (RelocSection and not Deffile.empty)) then
    for ii:=1 to target_link.binders do
    begin
      s:=target_link.bindcmd[ii];
@@ -733,7 +735,12 @@ end;
 end.
 {
   $Log$
-  Revision 1.64  1999-07-30 23:19:45  peter
+  Revision 1.65  1999-08-10 12:51:16  pierre
+    * bind_win32_dll removed (Relocsection used instead)
+    * now relocsection is true by default ! (needs dlltool
+      for DLL generation)
+
+  Revision 1.64  1999/07/30 23:19:45  peter
     * fixed placing of dynamiclinker in link.res (should be the last after
       all other libraries)
 

+ 8 - 2
compiler/options.pas

@@ -664,7 +664,8 @@ begin
               'W' : begin
                       for j:=1 to length(More) do
                        case More[j]of
-                        'B': bind_win32_dll:=true;
+                        'B': {bind_win32_dll:=true}
+                             RelocSection:=true;
                         'C': apptype:=at_cui;
                         'G': apptype:=at_gui;
                         'N': RelocSection:=false;
@@ -1162,7 +1163,12 @@ end;
 end.
 {
   $Log$
-  Revision 1.11  1999-08-09 22:19:52  peter
+  Revision 1.12  1999-08-10 12:51:17  pierre
+    * bind_win32_dll removed (Relocsection used instead)
+    * now relocsection is true by default ! (needs dlltool
+      for DLL generation)
+
+  Revision 1.11  1999/08/09 22:19:52  peter
     * classes vmt changed to only positive addresses
     * sharedlib creation is working
 

+ 10 - 2
compiler/pexports.pas

@@ -81,6 +81,7 @@ unit pexports;
                              val(pattern,hp^.index,code);
                              consume(_INTCONST);
                              DefString:=ProcName+'='+InternalProcName;{Index ignored!}
+                             (* DefString:=ProcName+'@'+pattern+'='+InternalProcName;{Index ignored!} *)
                           end;
                         if (idtoken=_NAME) then
                           begin
@@ -101,7 +102,9 @@ unit pexports;
                         if srsym^.typ=procsym then
                           exportlib^.exportprocedure(hp)
                         else
-                          exportlib^.exportvar(hp);
+                          begin
+                             exportlib^.exportvar(hp);
+                          end;
                      end;
                 end
               else
@@ -120,7 +123,12 @@ end.
 
 {
   $Log$
-  Revision 1.11  1999-08-04 13:02:54  jonas
+  Revision 1.12  1999-08-10 12:51:19  pierre
+    * bind_win32_dll removed (Relocsection used instead)
+    * now relocsection is true by default ! (needs dlltool
+      for DLL generation)
+
+  Revision 1.11  1999/08/04 13:02:54  jonas
     * all tokens now start with an underscore
     * PowerPC compiles!!