2000-12-05 Kazu Hirata <kazu@hxi.com>
[deliverable/binutils-gdb.git] / bfd / elf32-i370.c
index 0715d86d08117cf2ba93171ee176a3db509eac66..d5b060e200150a95e6e7781a0925505aacaad632 100644 (file)
@@ -19,8 +19,6 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-
-
 /* This file is based on a preliminary PowerPC ELF ABI.
    But its been hacked on for the IBM 360/370 architectures.
    Basically, the 31bit relocation works, and just about everything
@@ -28,7 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    dynamic loading to work ...  its never been tested ...
 */
 
-
 #include "bfd.h"
 #include "sysdep.h"
 #include "bfdlink.h"
@@ -272,7 +269,7 @@ i370_elf_howto_init ()
   for (i = 0; i < sizeof (i370_elf_howto_raw) / sizeof (i370_elf_howto_raw[0]); i++)
     {
       type = i370_elf_howto_raw[i].type;
-      BFD_ASSERT (type < sizeof(i370_elf_howto_table) / sizeof(i370_elf_howto_table[0]));
+      BFD_ASSERT (type < sizeof (i370_elf_howto_table) / sizeof (i370_elf_howto_table[0]));
       i370_elf_howto_table[type] = &i370_elf_howto_raw[i];
     }
 }
@@ -350,7 +347,6 @@ static boolean i370_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_
 
 #define ELF_DYNAMIC_INTERPRETER "/lib/ld.so"
 
-
 /* Set the howto pointer for an i370 ELF reloc.  */
 
 static void
@@ -369,7 +365,7 @@ i370_elf_info_to_howto (abfd, cache_ptr, dst)
 /* hack alert --  the following several routines look generic to me ...
  * why are we bothering with them ???
  */
-/* Function to set whether a module needs the -mrelocatable bit set. */
+/* Function to set whether a module needs the -mrelocatable bit set.  */
 static boolean
 i370_elf_set_private_flags (abfd, flags)
      bfd *abfd;
@@ -471,7 +467,6 @@ i370_elf_section_from_shdr (abfd, hdr, name)
   return true;
 }
 
-
 \f
 /* Set up any other section flags and such that may be necessary.  */
 /* XXX hack alert bogus This routine is mostly all junk and almost
@@ -479,7 +474,6 @@ i370_elf_section_from_shdr (abfd, hdr, name)
  * just enough to allow glibc-2.1 ld.so to compile & link.
  */
 
-
 static boolean
 i370_elf_fake_sections (abfd, shdr, asect)
      bfd *abfd ATTRIBUTE_UNUSED;
@@ -610,7 +604,7 @@ i370_elf_create_dynamic_sections (abfd, info)
        return false;
     }
 
-   /* xxx beats me, seem to need a rela.text ... */
+   /* xxx beats me, seem to need a rela.text ...  */
    s = bfd_make_section (abfd, ".rela.text");
    if (s == NULL
       || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
@@ -654,7 +648,6 @@ i370_elf_adjust_dynamic_symbol (info, h)
                      && (h->elf_link_hash_flags
                          & ELF_LINK_HASH_DEF_REGULAR) == 0)));
 
-
   s = bfd_get_section_by_name (dynobj, ".rela.text");
   BFD_ASSERT (s != NULL);
   s->_raw_size += sizeof (Elf32_External_Rela);
@@ -879,7 +872,7 @@ i370_elf_size_dynamic_sections (output_bfd, info)
              asection *target;
              const char *outname;
 
-             /* Remember whether there are any relocation sections. */
+             /* Remember whether there are any relocation sections.  */
              relocs = true;
 
              /* If this relocation section applies to a read only
@@ -959,6 +952,7 @@ i370_elf_size_dynamic_sections (output_bfd, info)
        {
          if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
            return false;
+         info->flags |= DF_TEXTREL;
        }
     }
 
@@ -1418,12 +1412,12 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
            relocation = 0;
          else
            {
-             (*info->callbacks->undefined_symbol)(info,
-                                                  h->root.root.string,
-                                                  input_bfd,
-                                                  input_section,
-                                                  rel->r_offset,
-                                                  true);
+             (*info->callbacks->undefined_symbol) (info,
+                                                   h->root.root.string,
+                                                   input_bfd,
+                                                   input_section,
+                                                   rel->r_offset,
+                                                   true);
              ret = false;
              continue;
            }
@@ -1561,9 +1555,9 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
 #ifdef DEBUG
                          if (indx <= 0)
                            {
-                             printf("indx=%d section=%s flags=%08x name=%s\n",
-                                    indx, osec->name, osec->flags,
-                                    h->root.root.string);
+                             printf ("indx=%d section=%s flags=%08x name=%s\n",
+                                     indx, osec->name, osec->flags,
+                                     h->root.root.string);
                            }
 #endif
                        }
@@ -1601,7 +1595,6 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
          continue;
        }
 
-
 #ifdef DEBUG
       fprintf (stderr, "\ttype = %s (%d), name = %s, symbol index = %ld, offset = %ld, addend = %ld\n",
               howto->name,
@@ -1646,13 +1639,13 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                      name = bfd_section_name (input_bfd, sec);
                  }
 
-               (*info->callbacks->reloc_overflow)(info,
-                                                  name,
-                                                  howto->name,
-                                                  (bfd_vma) 0,
-                                                  input_bfd,
-                                                  input_section,
-                                                  offset);
+               (*info->callbacks->reloc_overflow) (info,
+                                                   name,
+                                                   howto->name,
+                                                   (bfd_vma) 0,
+                                                   input_bfd,
+                                                   input_section,
+                                                   offset);
              }
              break;
 
@@ -1660,7 +1653,6 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
        }
     }
 
-
 #ifdef DEBUG
   fprintf (stderr, "\n");
 #endif
@@ -1689,8 +1681,6 @@ i370_elf_post_process_headers (abfd, link_info)
 #define ELF_MAXPAGESIZE                0x1000
 #define elf_info_to_howto      i370_elf_info_to_howto
 
-
-
 #define elf_backend_plt_not_loaded 1
 #define elf_backend_got_symbol_offset 4
 
This page took 0.037335 seconds and 4 git commands to generate.