* coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
authorIan Lance Taylor <ian@airs.com>
Fri, 6 Oct 1995 19:49:48 +0000 (19:49 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 6 Oct 1995 19:49:48 +0000 (19:49 +0000)
if there are symbols, for native AIX ld compatibility.

bfd/ChangeLog
bfd/coffcode.h

index c87895d4ddac2906d9b5e996274c513a5e10a1c9..b4881a8f0ff3a9d2efd94844072e41652a4c041c 100644 (file)
@@ -8,6 +8,9 @@ Fri Oct  6 12:24:47 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
 
 Fri Oct  6 12:04:02 1995  Ian Lance Taylor  <ian@cygnus.com>
 
+       * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
+       if there are symbols, for native AIX ld compatibility.
+
        * coffcode.h (bfd_coff_backend_data): Add new field
        _bfd_coff_pointerize_aux_hook.
        (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
index 327d57590afc934fec7b99b40ca129c87717e6c7..152f6f1baef318c70258c9d56e7ca98c9817e6a3 100644 (file)
@@ -2072,7 +2072,14 @@ coff_write_object_contents (abfd)
      backend linker, and obj_raw_syment_count is not valid until after
      coff_write_symbols is called.  */
   if (obj_raw_syment_count (abfd) != 0)
-    internal_f.f_symptr = sym_base;
+    {
+      internal_f.f_symptr = sym_base;
+#ifdef RS6000COFF_C
+      /* AIX appears to require that F_RELFLG not be set if there are
+         local symbols but no relocations.  */
+      internal_f.f_flags &=~ F_RELFLG;
+#endif
+    }
   else
     {
       internal_f.f_symptr = 0;