Thu Nov 5 15:34:19 1992 Ian Lance Taylor (ian@cygnus.com)
authorIan Lance Taylor <ian@airs.com>
Fri, 6 Nov 1992 00:38:59 +0000 (00:38 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 6 Nov 1992 00:38:59 +0000 (00:38 +0000)
* section.c: New section bit SEC_SHARED_LIBRARY.
coffcode.h (styp_to_sec_flags): if STYP_NOLOAD && (STYP_TEXT ||
STYP_DATA), set SEC_SHARED_LIBRARY.  This seems to be correct for
i386-sysv.

bfd/ChangeLog
bfd/coffcode.h

index cd592f5ed9f93e32477d50926f4f931c73e72378..25f5074dfe3c835782af6b4ddc0c1ead80aef468 100644 (file)
@@ -1,3 +1,10 @@
+Thu Nov  5 15:34:19 1992  Ian Lance Taylor  (ian@cygnus.com)
+
+       * section.c: New section bit SEC_SHARED_LIBRARY.
+       coffcode.h (styp_to_sec_flags): if STYP_NOLOAD && (STYP_TEXT ||
+       STYP_DATA), set SEC_SHARED_LIBRARY.  This seems to be correct for
+       i386-sysv.
+
 Thu Nov  5 04:43:09 1992  John Gilmore  (gnu@cygnus.com)
 
        * target.c (struct bfd_target):  Eliminate the SDEF and SDEF_FMT
index 4f615ddebc91b406e2eed62c05a06a4c4d16f228..29b83ff4bd8db48ff98fa253b7cb82516f6ebe23 100644 (file)
@@ -399,9 +399,21 @@ DEFUN(styp_to_sec_flags, (styp_flags),
   }
 #endif /* STYP_NOLOAD */
 
-  if ((styp_flags & STYP_TEXT) || (styp_flags & STYP_DATA)) 
+  /* For 386 COFF, at least, an unloadable text or data section is
+     actually a shared library section.  */
+  if (styp_flags & STYP_TEXT)
   {
-    sec_flags |= SEC_LOAD | SEC_ALLOC;
+    if (sec_flags & SEC_NEVER_LOAD)
+      sec_flags |= SEC_CODE | SEC_SHARED_LIBRARY;
+    else
+      sec_flags |= SEC_CODE | SEC_LOAD | SEC_ALLOC;
+  }
+  else if (styp_flags & STYP_DATA)
+  {
+    if (sec_flags & SEC_NEVER_LOAD)
+      sec_flags |= SEC_DATA | SEC_SHARED_LIBRARY;
+    else
+      sec_flags |= SEC_DATA | SEC_LOAD | SEC_ALLOC;
   }
   else if (styp_flags & STYP_BSS) 
   {
This page took 0.027726 seconds and 4 git commands to generate.