aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i370.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2000-12-05 13:20:10 +0000
committerKazu Hirata <kazu@codesourcery.com>2000-12-05 13:20:10 +0000
commit6609fa7475519eeee34272b25d38995906cb315e (patch)
treebb8093abe705e2e36da9454b63e32a1eb1c36129 /bfd/elf32-i370.c
parent62fd9fad960dc88e1d36328841c34934b6615925 (diff)
downloadgdb-6609fa7475519eeee34272b25d38995906cb315e.zip
gdb-6609fa7475519eeee34272b25d38995906cb315e.tar.gz
gdb-6609fa7475519eeee34272b25d38995906cb315e.tar.bz2
2000-12-05 Kazu Hirata <kazu@hxi.com>
* elf32-fr30.c: Fix formatting. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i860.c: Likewise. * elf32-i960.c: Likewise.
Diffstat (limited to 'bfd/elf32-i370.c')
-rw-r--r--bfd/elf32-i370.c51
1 files changed, 20 insertions, 31 deletions
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 67c6964..d5b060e 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -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;
}
-
/* 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
@@ -1419,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;
}
@@ -1562,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
}
@@ -1602,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,
@@ -1647,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;
@@ -1661,7 +1653,6 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
-
#ifdef DEBUG
fprintf (stderr, "\n");
#endif
@@ -1690,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