summaryrefslogtreecommitdiffstats
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
parent62fd9fad960dc88e1d36328841c34934b6615925 (diff)
downloadppe42-binutils-6609fa7475519eeee34272b25d38995906cb315e.tar.gz
ppe42-binutils-6609fa7475519eeee34272b25d38995906cb315e.zip
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.
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/elf32-fr30.c72
-rw-r--r--bfd/elf32-hppa.c45
-rw-r--r--bfd/elf32-i370.c51
-rw-r--r--bfd/elf32-i386.c3
-rw-r--r--bfd/elf32-i860.c45
-rw-r--r--bfd/elf32-i960.c2
7 files changed, 86 insertions, 141 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 32dc917287..2e917ce6e4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
2000-12-03 Kazu Hirata <kazu@hxi.com>
* elf32-arm.h: Fix formatting.
diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c
index b150ec9564..f2b4b445cf 100644
--- a/bfd/elf32-fr30.c
+++ b/bfd/elf32-fr30.c
@@ -30,9 +30,9 @@ static bfd_reloc_status_type fr30_elf_i32_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static reloc_howto_type * fr30_reloc_type_lookup
PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-static void fr30_info_to_howto_rela
+static void fr30_info_to_howto_rela
PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
-static boolean fr30_elf_relocate_section
+static boolean fr30_elf_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
static bfd_reloc_status_type fr30_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, bfd_vma));
@@ -132,7 +132,7 @@ static reloc_howto_type fr30_elf_howto_table [] =
0x0000, /* src_mask */
0x00f0, /* dst_mask */
false), /* pcrel_offset */
-
+
/* An 8 bit absolute relocation. */
HOWTO (R_FR30_8_IN_8, /* type */
0, /* rightshift */
@@ -147,7 +147,7 @@ static reloc_howto_type fr30_elf_howto_table [] =
0x0000, /* src_mask */
0x0ff0, /* dst_mask */
false), /* pcrel_offset */
-
+
/* A 9 bit absolute relocation. */
HOWTO (R_FR30_9_IN_8, /* type */
1, /* rightshift */
@@ -162,7 +162,7 @@ static reloc_howto_type fr30_elf_howto_table [] =
0x0000, /* src_mask */
0x0ff0, /* dst_mask */
false), /* pcrel_offset */
-
+
/* A 10 bit absolute relocation. */
HOWTO (R_FR30_10_IN_8, /* type */
2, /* rightshift */
@@ -236,7 +236,7 @@ static reloc_howto_type fr30_elf_howto_table [] =
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
-
+
};
/* Utility to actually perform an R_FR30_20 reloc. */
@@ -254,7 +254,7 @@ fr30_elf_i20_reloc (abfd, reloc_entry, symbol, data,
{
bfd_vma relocation;
unsigned long x;
-
+
/* This part is from bfd_elf_generic_reloc. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
@@ -362,7 +362,7 @@ fr30_reloc_type_lookup (abfd, code)
--i;)
if (fr30_reloc_map [i].bfd_reloc_val == code)
return & fr30_elf_howto_table [fr30_reloc_map[i].fr30_reloc_val];
-
+
return NULL;
}
@@ -396,7 +396,7 @@ fr30_final_link_relocate (howto, input_bfd, input_section, contents, rel, reloca
bfd_reloc_status_type r = bfd_reloc_ok;
bfd_vma x;
bfd_signed_vma srel;
-
+
switch (howto->type)
{
case R_FR30_20:
@@ -405,12 +405,12 @@ fr30_final_link_relocate (howto, input_bfd, input_section, contents, rel, reloca
if (relocation > ((1 << 20) - 1))
return bfd_reloc_overflow;
-
+
x = bfd_get_32 (input_bfd, contents);
x = (x & 0xff0f0000) | (relocation & 0x0000ffff) | ((relocation & 0x000f0000) << 4);
bfd_put_32 (input_bfd, x, contents);
break;
-
+
case R_FR30_48:
contents += rel->r_offset + 2;
relocation += rel->r_addend;
@@ -422,10 +422,10 @@ fr30_final_link_relocate (howto, input_bfd, input_section, contents, rel, reloca
srel = (bfd_signed_vma) relocation;
srel += rel->r_addend;
srel -= rel->r_offset;
- srel -= 2; /* Branch instructions add 2 to the PC... */
+ srel -= 2; /* Branch instructions add 2 to the PC... */
srel -= (input_section->output_section->vma +
input_section->output_offset);
-
+
if (srel & 1)
return bfd_reloc_outofrange;
if (srel > ((1 << 8) - 1) || (srel < - (1 << 8)))
@@ -439,15 +439,15 @@ fr30_final_link_relocate (howto, input_bfd, input_section, contents, rel, reloca
srel = (bfd_signed_vma) relocation;
srel += rel->r_addend;
srel -= rel->r_offset;
- srel -= 2; /* Branch instructions add 2 to the PC... */
+ srel -= 2; /* Branch instructions add 2 to the PC... */
srel -= (input_section->output_section->vma +
input_section->output_offset);
-
+
if (srel & 1)
return bfd_reloc_outofrange;
if (srel > ((1 << 11) - 1) || (srel < - (1 << 11)))
return bfd_reloc_overflow;
-
+
x = bfd_get_16 (input_bfd, contents);
x = (x & 0xf800) | ((srel >> 1) & 0x7ff);
bfd_put_16 (input_bfd, x, contents);
@@ -528,13 +528,13 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_reloc_status_type r;
const char * name = NULL;
int r_type;
-
+
r_type = ELF32_R_TYPE (rel->r_info);
-
+
if ( r_type == R_FR30_GNU_VTINHERIT
|| r_type == R_FR30_GNU_VTENTRY)
continue;
-
+
r_symndx = ELF32_R_SYM (rel->r_info);
if (info->relocateable)
@@ -546,7 +546,7 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
-
+
if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
{
sec = local_sections [r_symndx];
@@ -562,7 +562,7 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
h = NULL;
sym = NULL;
sec = NULL;
-
+
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
@@ -570,7 +570,7 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (sec->output_section->vma
+ sec->output_offset
+ sym->st_value);
-
+
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
@@ -584,13 +584,13 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
h = sym_hashes [r_symndx - symtab_hdr->sh_info];
-
+
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
name = h->root.root.string;
-
+
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
@@ -625,7 +625,7 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = 0;
}
}
-
+
r = fr30_final_link_relocate (howto, input_bfd, input_section,
contents, rel, relocation);
@@ -640,13 +640,13 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
(info, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset);
break;
-
+
case bfd_reloc_undefined:
r = info->callbacks->undefined_symbol
(info, name, input_bfd, input_section, rel->r_offset,
true);
break;
-
+
case bfd_reloc_outofrange:
msg = _("internal error: out of range error");
break;
@@ -739,7 +739,7 @@ fr30_elf_gc_sweep_hook (abfd, info, sec, relocs)
/* Look through the relocs for a section during the first phase.
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
-
+
static boolean
fr30_elf_check_relocs (abfd, info, sec, relocs)
bfd *abfd;
@@ -751,28 +751,28 @@ fr30_elf_check_relocs (abfd, info, sec, relocs)
struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
-
+
if (info->relocateable)
return true;
-
+
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
- sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym);
+ sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
if (!elf_bad_symtab (abfd))
sym_hashes_end -= symtab_hdr->sh_info;
-
+
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
{
struct elf_link_hash_entry *h;
unsigned long r_symndx;
-
+
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
+
switch (ELF32_R_TYPE (rel->r_info))
{
/* This relocation describes the C++ object vtable hierarchy.
@@ -781,7 +781,7 @@ fr30_elf_check_relocs (abfd, info, sec, relocs)
if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
return false;
break;
-
+
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_FR30_GNU_VTENTRY:
@@ -790,7 +790,7 @@ fr30_elf_check_relocs (abfd, info, sec, relocs)
break;
}
}
-
+
return true;
}
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 609c5fd037..3d0c9eec9c 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -35,7 +35,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf-hppa.h"
#include "elf32-hppa.h"
-
/* In order to gain some understanding of code in this file without
knowing all the intricate details of the linker, note the
following:
@@ -47,7 +46,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
early in the link process, elf32_hppa_finish_dynamic_sections is
one of the last functions. */
-
/* We use two hash tables to hold information for linking PA ELF objects.
The first is the elf32_hppa_link_hash_table which is derived
@@ -156,7 +154,6 @@ static const bfd_byte plt_stub[] =
#define RELATIVE_DYNAMIC_RELOCS 0
#endif
-
enum elf32_hppa_stub_type {
hppa_stub_long_branch,
hppa_stub_long_branch_shared,
@@ -166,7 +163,6 @@ enum elf32_hppa_stub_type {
hppa_stub_none
};
-
struct elf32_hppa_stub_hash_entry {
/* Base hash table entry structure. */
@@ -198,7 +194,6 @@ struct elf32_hppa_stub_hash_entry {
asection *id_sec;
};
-
struct elf32_hppa_link_hash_entry {
struct elf_link_hash_entry elf;
@@ -240,7 +235,6 @@ struct elf32_hppa_link_hash_entry {
unsigned int plt_abs:1;
};
-
struct elf32_hppa_link_hash_table {
/* The main hash table. */
@@ -290,7 +284,6 @@ struct elf32_hppa_link_hash_table {
unsigned int need_plt_stub:1;
};
-
/* Various hash macros and functions. */
#define hppa_link_hash_table(p) \
((struct elf32_hppa_link_hash_table *) ((p)->hash))
@@ -308,7 +301,6 @@ static struct bfd_hash_entry *hppa_link_hash_newfunc
static struct bfd_link_hash_table *elf32_hppa_link_hash_table_create
PARAMS ((bfd *));
-
/* Stub handling functions. */
static char *hppa_stub_name
PARAMS ((const asection *, const asection *,
@@ -334,7 +326,6 @@ static boolean hppa_build_one_stub
static boolean hppa_size_one_stub
PARAMS ((struct bfd_hash_entry *, PTR));
-
/* BFD and elf backend functions. */
static boolean elf32_hppa_object_p PARAMS ((bfd *));
@@ -397,7 +388,6 @@ static boolean elf32_hppa_finish_dynamic_sections
static int elf32_hppa_elf_get_symbol_type
PARAMS ((Elf_Internal_Sym *, int));
-
/* Assorted hash table functions. */
/* Initialize an entry in the stub hash table. */
@@ -445,7 +435,6 @@ stub_hash_newfunc (entry, table, string)
return (struct bfd_hash_entry *) ret;
}
-
/* Initialize an entry in the link hash table. */
static struct bfd_hash_entry *
@@ -492,7 +481,6 @@ hppa_link_hash_newfunc (entry, table, string)
return (struct bfd_hash_entry *) ret;
}
-
/* Create the derived linker hash table. The PA ELF port uses the derived
hash table to keep information specific to the PA ELF linker (without
using static variables). */
@@ -535,7 +523,6 @@ elf32_hppa_link_hash_table_create (abfd)
return &ret->root.root;
}
-
/* Build a name for an entry in the stub hash table. */
static char *
@@ -576,7 +563,6 @@ hppa_stub_name (input_section, sym_sec, hash, rel)
return stub_name;
}
-
/* Look up an entry in the stub hash. Stub entries are cached because
creating the stub name takes a bit of time. */
@@ -635,7 +621,6 @@ hppa_get_stub_entry (input_section, sym_sec, hash, rel, hplink)
return stub_entry;
}
-
/* Add a new stub entry to the stub hash. Not all fields of the new
stub entry are initialised. */
@@ -694,7 +679,6 @@ hppa_add_stub (stub_name, section, hplink)
return stub_entry;
}
-
/* Determine the type of stub needed, if any, for a call. */
static enum elf32_hppa_stub_type
@@ -771,7 +755,6 @@ hppa_type_of_stub (input_sec, rel, hash, destination)
return hppa_stub_none;
}
-
/* Build one linker stub as defined by the stub hash table entry GEN_ENTRY.
IN_ARG contains the link info pointer. */
@@ -1082,7 +1065,6 @@ hppa_build_one_stub (gen_entry, in_arg)
#undef LDSID_RP_R1
#undef BE_SR0_RP
-
/* As above, but don't actually build the stub. Just bump offset so
we know stub section sizes. */
@@ -1123,7 +1105,6 @@ hppa_size_one_stub (gen_entry, in_arg)
return true;
}
-
/* Return nonzero if ABFD represents an HPPA ELF32 file.
Additionally we set the default architecture and machine. */
@@ -1147,7 +1128,6 @@ elf32_hppa_object_p (abfd)
return true;
}
-
/* Undo the generic ELF code's subtraction of section->vma from the
value of each external symbol. */
@@ -1165,7 +1145,6 @@ elf32_hppa_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
return true;
}
-
/* Create the .plt and .got sections, and set up our hash table
short-cuts to various dynamic sections. */
@@ -1207,7 +1186,6 @@ elf32_hppa_create_dynamic_sections (abfd, info)
return true;
}
-
/* Look through the relocs for a section during the first phase, and
allocate space in the global offset table or procedure linkage
table. At this point we haven't necessarily read all the input
@@ -1696,7 +1674,6 @@ elf32_hppa_check_relocs (abfd, info, sec, relocs)
return true;
}
-
/* Return the section that should be marked against garbage collection
for a given relocation. */
@@ -1745,7 +1722,6 @@ elf32_hppa_gc_mark_hook (abfd, info, rel, h, sym)
return NULL;
}
-
/* Update the got and plt entry reference counts for the section being
removed. */
@@ -1855,7 +1831,6 @@ elf32_hppa_gc_sweep_hook (abfd, info, sec, relocs)
return true;
}
-
/* Our own version of hide_symbol, so that we can keep plt entries for
plabels. */
@@ -1872,7 +1847,6 @@ elf32_hppa_hide_symbol (info, h)
}
}
-
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
@@ -2041,7 +2015,6 @@ elf32_hppa_adjust_dynamic_symbol (info, h)
return true;
}
-
/* Called via elf_link_hash_traverse to create .plt entries for an
application that uses statically linked PIC functions. Similar to
the first part of elf32_hppa_adjust_dynamic_symbol. */
@@ -2081,7 +2054,6 @@ hppa_handle_PIC_calls (h, inf)
return true;
}
-
#if ((! LONG_BRANCH_PIC_IN_SHLIB && LONG_BRANCH_VIA_PLT) \
|| RELATIVE_DYNAMIC_RELOCS)
/* This function is called via elf_link_hash_traverse to discard space
@@ -2132,7 +2104,6 @@ hppa_discard_copies (h, inf)
}
#endif
-
/* This function is called via elf_link_hash_traverse to force
millicode symbols local so they do not end up as globals in the
dynamic symbol table. We ought to be able to do this in
@@ -2152,7 +2123,6 @@ clobber_millicode_symbols (h, info)
return true;
}
-
/* Set the sizes of the dynamic sections. */
static boolean
@@ -2198,7 +2168,7 @@ elf32_hppa_size_dynamic_sections (output_bfd, info)
{
struct elf_link_hash_entry *h;
- h = elf_link_hash_lookup (&hplink->root,
+ h = elf_link_hash_lookup (&hplink->root,
funcname,
false, false, false);
if (h != NULL
@@ -2437,7 +2407,6 @@ elf32_hppa_size_dynamic_sections (output_bfd, info)
return true;
}
-
/* External entry points for sizing and building linker stubs. */
/* Determine and set the size of the stub section for a final link.
@@ -3068,7 +3037,6 @@ elf32_hppa_size_stubs (output_bfd, stub_bfd, info, multi_subspace, group_size,
return ret;
}
-
/* For a final link, this function is called after we have sized the
stubs to provide a value for __gp. */
@@ -3138,7 +3106,6 @@ elf32_hppa_set_gp (abfd, info)
return true;
}
-
/* Build all the stubs associated with the current output file. The
stubs are kept in a hash table attached to the main linker hash
table. We also set up the .plt entries for statically linked PIC
@@ -3177,7 +3144,6 @@ elf32_hppa_build_stubs (info)
return true;
}
-
/* Perform a relocation as part of a final link. */
static bfd_reloc_status_type
@@ -3430,7 +3396,6 @@ final_link_relocate (input_section, contents, rel, value, hplink, sym_sec, h)
return bfd_reloc_ok;
}
-
/* Relocate an HPPA ELF section. */
static boolean
@@ -3762,7 +3727,7 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
&& (is_absolute_reloc (r_type)
|| ((!info->symbolic
|| (h != NULL
- && ((h->elf.elf_link_hash_flags
+ && ((h->elf.elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0
|| h->elf.root.type == bfd_link_hash_defweak)))
&& (h == NULL || h->elf.dynindx != -1)))
@@ -3907,7 +3872,6 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
return true;
}
-
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
@@ -4083,7 +4047,6 @@ elf32_hppa_finish_dynamic_symbol (output_bfd, info, h, sym)
return true;
}
-
/* Finish up the dynamic sections. */
static boolean
@@ -4146,7 +4109,7 @@ elf32_hppa_finish_dynamic_sections (output_bfd, info)
{
struct elf_link_hash_entry *h;
const char *funcname;
-
+
if (dyn.d_tag == DT_INIT)
funcname = info->init_function;
else
@@ -4216,7 +4179,6 @@ elf32_hppa_finish_dynamic_sections (output_bfd, info)
return true;
}
-
/* Called when writing out an object file to decide the type of a
symbol. */
static int
@@ -4230,7 +4192,6 @@ elf32_hppa_elf_get_symbol_type (elf_sym, type)
return type;
}
-
/* Misc BFD support code. */
#define bfd_elf32_bfd_is_local_label_name elf_hppa_is_local_label_name
#define bfd_elf32_bfd_reloc_type_lookup elf_hppa_reloc_type_lookup
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 67c6964cd9..d5b060e200 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
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 336e889f5f..11664ea31e 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -150,7 +150,6 @@ static reloc_howto_type elf_howto_table[]=
};
-
#ifdef DEBUG_GEN_RELOC
#define TRACE(str) fprintf (stderr, "i386 bfd reloc lookup %d (%s)\n", code, str)
#else
@@ -1254,7 +1253,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
space allocated to copy PC relative relocs against symbols which
are defined in regular objects. For the normal non-symbolic case,
we also discard space for relocs that have become local due to
- symbol visibility changes. We allocated space for them in the
+ symbol visibility changes. We allocated space for them in the
check_relocs routine, but we won't fill them in in the
relocate_section routine. */
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c
index a0668da166..2857a16811 100644
--- a/bfd/elf32-i860.c
+++ b/bfd/elf32-i860.c
@@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf-bfd.h"
#include "elf/i860.h"
-
/* Prototypes. */
static reloc_howto_type *lookup_howto
PARAMS ((unsigned int));
@@ -33,7 +32,7 @@ static reloc_howto_type *lookup_howto
static reloc_howto_type *elf32_i860_reloc_type_lookup
PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-static void elf32_i860_info_to_howto_rela
+static void elf32_i860_info_to_howto_rela
PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
static bfd_reloc_status_type elf32_i860_relocate_splitn
@@ -48,7 +47,7 @@ static bfd_reloc_status_type elf32_i860_relocate_pc26
static bfd_reloc_status_type elf32_i860_relocate_highadj
PARAMS ((bfd *, Elf_Internal_Rela *, bfd_byte *, bfd_vma));
-static boolean elf32_i860_relocate_section
+static boolean elf32_i860_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
@@ -59,8 +58,6 @@ static bfd_reloc_status_type i860_final_link_relocate
static boolean elf32_i860_is_local_label_name
PARAMS ((bfd *, const char *));
-
-
/* This howto table is preliminary. */
static reloc_howto_type elf32_i860_howto_table [] =
{
@@ -573,7 +570,6 @@ lookup_howto (rtype)
return elf32_i860_howto_table + i;
}
-
/* Given a BFD reloc, return the matching HOWTO structure. */
static reloc_howto_type *
elf32_i860_reloc_type_lookup (abfd, code)
@@ -594,7 +590,7 @@ elf32_i860_reloc_type_lookup (abfd, code)
rtype = R_860_COPY;
break;
case BFD_RELOC_860_GLOB_DAT:
- rtype = R_860_GLOB_DAT;
+ rtype = R_860_GLOB_DAT;
break;
case BFD_RELOC_860_JUMP_SLOT:
rtype = R_860_JUMP_SLOT;
@@ -693,7 +689,6 @@ elf32_i860_reloc_type_lookup (abfd, code)
return lookup_howto (rtype);
}
-
/* Given a ELF reloc, return the matching HOWTO structure. */
static void
elf32_i860_info_to_howto_rela (abfd, bfd_reloc, elf_reloc)
@@ -704,7 +699,6 @@ elf32_i860_info_to_howto_rela (abfd, bfd_reloc, elf_reloc)
bfd_reloc->howto = lookup_howto (ELF32_R_TYPE (elf_reloc->r_info));
}
-
/* Specialized relocation handler for R_860_SPLITn. These relocations
involves a 16-bit field that is split into two contiguous parts. */
@@ -731,7 +725,6 @@ elf32_i860_relocate_splitn (input_bfd, rello, contents, value)
return bfd_reloc_ok;
}
-
/* Specialized relocation handler for R_860_PC16. This relocation
involves a 16-bit, PC-relative field that is split into two contiguous
parts. */
@@ -765,7 +758,6 @@ elf32_i860_relocate_pc16 (input_bfd, input_section, rello, contents, value)
}
-
/* Specialized relocation handler for R_860_PC26. This relocation
involves a 26-bit, PC-relative field which must be adjusted by 4. */
static bfd_reloc_status_type
@@ -790,7 +782,7 @@ elf32_i860_relocate_pc26 (input_bfd, input_section, rello, contents, value)
value += rello->r_addend;
/* Adjust value by 4 and insert the field. */
- value = ((value - 4) >> howto->rightshift) & howto->dst_mask;
+ value = ((value - 4) >> howto->rightshift) & howto->dst_mask;
insn = (insn & ~howto->dst_mask) | value;
bfd_put_32 (input_bfd, insn, contents + rello->r_offset);
@@ -798,7 +790,6 @@ elf32_i860_relocate_pc26 (input_bfd, input_section, rello, contents, value)
}
-
/* Specialized relocation handler for R_860_HIGHADJ. */
static bfd_reloc_status_type
elf32_i860_relocate_highadj (input_bfd, rel, contents, value)
@@ -821,7 +812,6 @@ elf32_i860_relocate_highadj (input_bfd, rel, contents, value)
return bfd_reloc_ok;
}
-
/* Perform a single relocation. By default we use the standard BFD
routines. However, we handle some specially. */
static bfd_reloc_status_type
@@ -838,7 +828,6 @@ i860_final_link_relocate (howto, input_bfd, input_section, contents, rel, reloca
rel->r_addend);
}
-
/* Relocate an i860 ELF section.
This is boiler-plate code copied from fr30.
@@ -905,15 +894,15 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_reloc_status_type r;
const char * name = NULL;
int r_type;
-
+
r_type = ELF32_R_TYPE (rel->r_info);
-
+
#if 0
if ( r_type == R_860_GNU_VTINHERIT
|| r_type == R_860_GNU_VTENTRY)
continue;
#endif
-
+
r_symndx = ELF32_R_SYM (rel->r_info);
if (info->relocateable)
@@ -925,7 +914,7 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
-
+
if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
{
sec = local_sections [r_symndx];
@@ -941,7 +930,7 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
h = NULL;
sym = NULL;
sec = NULL;
-
+
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
@@ -949,7 +938,7 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (sec->output_section->vma
+ sec->output_offset
+ sym->st_value);
-
+
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
@@ -957,13 +946,13 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
h = sym_hashes [r_symndx - symtab_hdr->sh_info];
-
+
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
name = h->root.root.string;
-
+
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
@@ -985,7 +974,7 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = 0;
}
}
-
+
switch (r_type)
{
default:
@@ -1039,7 +1028,7 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
case R_860_HIGOTOFF:
r = bfd_reloc_notsupported;
break;
- }
+ }
if (r != bfd_reloc_ok)
{
@@ -1052,12 +1041,12 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
(info, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset);
break;
-
+
case bfd_reloc_undefined:
r = info->callbacks->undefined_symbol
(info, name, input_bfd, input_section, rel->r_offset, true);
break;
-
+
case bfd_reloc_outofrange:
msg = _("internal error: out of range error");
break;
@@ -1087,7 +1076,6 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
return true;
}
-
/* Return whether a symbol name implies a local label. SVR4/860 compilers
generate labels of the form ".ep.function_name" to denote the end of a
function prolog. These should be local.
@@ -1104,7 +1092,6 @@ elf32_i860_is_local_label_name (abfd, name)
return _bfd_elf_is_local_label_name (abfd, name);
}
-
#define TARGET_BIG_SYM bfd_elf32_i860_vec
#define TARGET_BIG_NAME "elf32-i860"
diff --git a/bfd/elf32-i960.c b/bfd/elf32-i960.c
index 839fc3d892..20ee48b0f6 100644
--- a/bfd/elf32-i960.c
+++ b/bfd/elf32-i960.c
@@ -129,7 +129,7 @@ elf32_i960_relocate (abfd,
{
reloc_entry->addend -= symbol->value;
}
- /* This is more dubious. */
+ /* This is more dubious. */
else if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) != 0)
{
OpenPOWER on IntegriCloud