2000-12-08 Kazu Hirata <kazu@hxi.com>

* elf64-alpha.c: Fix formatting.
	* elf64-hppa.c: Likewise.
	* elf64-mips.c: Likewise.
This commit is contained in:
Kazu Hirata
2000-12-09 01:54:51 +00:00
parent 40293bdaea
commit fe8bc63d5e
4 changed files with 73 additions and 78 deletions

View File

@ -29,6 +29,7 @@
2000-12-08 Kazu Hirata <kazu@hxi.com> 2000-12-08 Kazu Hirata <kazu@hxi.com>
* coffgen.c: Fix formatting. * coffgen.c: Fix formatting.
* elf-m10300.c: Likewise.
* elf32-i386.c: Likewise. * elf32-i386.c: Likewise.
* elf32-i960.c: Likewise. * elf32-i960.c: Likewise.
* elf32-m68k.c: Likewise. * elf32-m68k.c: Likewise.
@ -37,8 +38,10 @@
* elf32-sh.c: Likewise. * elf32-sh.c: Likewise.
* elf32-sparc.c: Likewise. * elf32-sparc.c: Likewise.
* elf32-v850.c: Likewise. * elf32-v850.c: Likewise.
* elf64-alpha.c: Likewise.
* elf64-hppa.c: Likewise.
* elf64-mips.c: Likewise.
* elf64-sparc.c: Likewise. * elf64-sparc.c: Likewise.
* elf-m10300.c: Likewise.
2000-12-07 Kazu Hirata <kazu@hxi.com> 2000-12-07 Kazu Hirata <kazu@hxi.com>

View File

@ -1469,7 +1469,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
if (! link_info->keep_memory) if (! link_info->keep_memory)
free_relocs = internal_relocs; free_relocs = internal_relocs;
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof (info));
info.abfd = abfd; info.abfd = abfd;
info.sec = sec; info.sec = sec;
info.link_info = link_info; info.link_info = link_info;
@ -1971,7 +1971,7 @@ elf64_alpha_read_ecoff_info (abfd, section, debug)
char *ext_hdr = NULL; char *ext_hdr = NULL;
swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap; swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap;
memset (debug, 0, sizeof(*debug)); memset (debug, 0, sizeof (*debug));
ext_hdr = (char *) bfd_malloc ((size_t) swap->external_hdr_size); ext_hdr = (char *) bfd_malloc ((size_t) swap->external_hdr_size);
if (ext_hdr == NULL && swap->external_hdr_size != 0) if (ext_hdr == NULL && swap->external_hdr_size != 0)
@ -3137,7 +3137,7 @@ elf64_alpha_calc_dynrel_sizes (h, info)
|| relent->rtype == R_ALPHA_REFQUAD) || relent->rtype == R_ALPHA_REFQUAD)
{ {
relent->srel->_raw_size += relent->srel->_raw_size +=
sizeof(Elf64_External_Rela) * relent->count; sizeof (Elf64_External_Rela) * relent->count;
} }
dynobj = elf_hash_table(info)->dynobj; dynobj = elf_hash_table(info)->dynobj;
@ -3212,7 +3212,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
i = alpha_elf_tdata(i)->got_link_next) i = alpha_elf_tdata(i)->got_link_next)
count += alpha_elf_tdata(i)->n_local_got_entries; count += alpha_elf_tdata(i)->n_local_got_entries;
srel->_raw_size += count * sizeof(Elf64_External_Rela); srel->_raw_size += count * sizeof (Elf64_External_Rela);
} }
} }
/* else we're not dynamic and by definition we don't need such things. */ /* else we're not dynamic and by definition we don't need such things. */
@ -3315,7 +3315,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
if (! bfd_elf64_add_dynamic_entry (info, DT_RELA, 0) if (! bfd_elf64_add_dynamic_entry (info, DT_RELA, 0)
|| ! bfd_elf64_add_dynamic_entry (info, DT_RELASZ, 0) || ! bfd_elf64_add_dynamic_entry (info, DT_RELASZ, 0)
|| ! bfd_elf64_add_dynamic_entry (info, DT_RELAENT, || ! bfd_elf64_add_dynamic_entry (info, DT_RELAENT,
sizeof(Elf64_External_Rela))) sizeof (Elf64_External_Rela)))
return false; return false;
if (reltext) if (reltext)
@ -3528,7 +3528,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
case R_ALPHA_OP_PSUB: case R_ALPHA_OP_PSUB:
case R_ALPHA_OP_PRSHIFT: case R_ALPHA_OP_PRSHIFT:
/* We hate these silly beasts. */ /* We hate these silly beasts. */
abort(); abort ();
case R_ALPHA_LITERAL: case R_ALPHA_LITERAL:
{ {
@ -3582,7 +3582,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
((Elf64_External_Rela *) ((Elf64_External_Rela *)
srelgot->contents) srelgot->contents)
+ srelgot->reloc_count++); + srelgot->reloc_count++);
BFD_ASSERT (sizeof(Elf64_External_Rela) BFD_ASSERT (sizeof (Elf64_External_Rela)
* srelgot->reloc_count * srelgot->reloc_count
<= srelgot->_cooked_size); <= srelgot->_cooked_size);
} }
@ -3687,7 +3687,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
((Elf64_External_Rela *) ((Elf64_External_Rela *)
srel->contents) srel->contents)
+ srel->reloc_count++); + srel->reloc_count++);
BFD_ASSERT (sizeof(Elf64_External_Rela) * srel->reloc_count BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
<= srel->_cooked_size); <= srel->_cooked_size);
} }
goto default_reloc; goto default_reloc;
@ -3840,7 +3840,7 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
((Elf64_External_Rela *) ((Elf64_External_Rela *)
srel->contents) srel->contents)
+ srel->reloc_count++); + srel->reloc_count++);
BFD_ASSERT (sizeof(Elf64_External_Rela) * srel->reloc_count BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
<= srel->_cooked_size); <= srel->_cooked_size);
} }
@ -3873,7 +3873,7 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_elf64_swap_reloca_out (output_bfd, &outrel, bfd_elf64_swap_reloca_out (output_bfd, &outrel,
((Elf64_External_Rela *)srel->contents ((Elf64_External_Rela *)srel->contents
+ srel->reloc_count++)); + srel->reloc_count++));
BFD_ASSERT (sizeof(Elf64_External_Rela) * srel->reloc_count BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
<= srel->_cooked_size); <= srel->_cooked_size);
} }
} }
@ -4291,7 +4291,6 @@ elf64_alpha_final_link (abfd, info)
} }
#endif #endif
/* Build the external symbol information. */ /* Build the external symbol information. */
einfo.abfd = abfd; einfo.abfd = abfd;
einfo.info = info; einfo.info = info;

View File

@ -169,19 +169,17 @@ static struct elf64_hppa_dyn_hash_entry *elf64_hppa_dyn_hash_lookup
boolean create, boolean copy)); boolean create, boolean copy));
static void elf64_hppa_dyn_hash_traverse static void elf64_hppa_dyn_hash_traverse
PARAMS ((struct elf64_hppa_dyn_hash_table *table, PARAMS ((struct elf64_hppa_dyn_hash_table *table,
boolean (*func)(struct elf64_hppa_dyn_hash_entry *, PTR), boolean (*func) (struct elf64_hppa_dyn_hash_entry *, PTR),
PTR info)); PTR info));
static const char *get_dyn_name static const char *get_dyn_name
PARAMS ((asection *, struct elf_link_hash_entry *, PARAMS ((asection *, struct elf_link_hash_entry *,
const Elf_Internal_Rela *, char **, size_t *)); const Elf_Internal_Rela *, char **, size_t *));
/* This must follow the definitions of the various derived linker /* This must follow the definitions of the various derived linker
hash tables and shared functions. */ hash tables and shared functions. */
#include "elf-hppa.h" #include "elf-hppa.h"
static boolean elf64_hppa_object_p static boolean elf64_hppa_object_p
PARAMS ((bfd *)); PARAMS ((bfd *));
@ -266,7 +264,7 @@ elf64_hppa_dyn_hash_table_init (ht, abfd, new)
bfd *abfd ATTRIBUTE_UNUSED; bfd *abfd ATTRIBUTE_UNUSED;
new_hash_entry_func new; new_hash_entry_func new;
{ {
memset (ht, 0, sizeof(*ht)); memset (ht, 0, sizeof (*ht));
return bfd_hash_table_init (&ht->root, new); return bfd_hash_table_init (&ht->root, new);
} }
@ -289,7 +287,7 @@ elf64_hppa_new_dyn_hash_entry (entry, table, string)
/* Initialize our local data. All zeros, and definitely easier /* Initialize our local data. All zeros, and definitely easier
than setting 8 bit fields. */ than setting 8 bit fields. */
memset (ret, 0, sizeof(*ret)); memset (ret, 0, sizeof (*ret));
/* Call the allocation method of the superclass. */ /* Call the allocation method of the superclass. */
ret = ((struct elf64_hppa_dyn_hash_entry *) ret = ((struct elf64_hppa_dyn_hash_entry *)
@ -394,7 +392,6 @@ elf64_hppa_section_from_shdr (abfd, hdr, name)
return true; return true;
} }
/* Construct a string for use in the elf64_hppa_dyn_hash_table. The /* Construct a string for use in the elf64_hppa_dyn_hash_table. The
name describes what was once potentially anonymous memory. We name describes what was once potentially anonymous memory. We
allocate memory as necessary, possibly reusing PBUF/PLEN. */ allocate memory as necessary, possibly reusing PBUF/PLEN. */
@ -2197,7 +2194,6 @@ elf64_hppa_finalize_dlt (dyn_h, data)
= _bfd_elf_link_lookup_local_dynindx (info, dyn_h->owner, = _bfd_elf_link_lookup_local_dynindx (info, dyn_h->owner,
dyn_h->sym_indx); dyn_h->sym_indx);
/* Create a dynamic relocation for this entry. Do include the output /* Create a dynamic relocation for this entry. Do include the output
offset of the DLT entry since we need an absolute address in the offset of the DLT entry since we need an absolute address in the
resulting object file. */ resulting object file. */
@ -2370,7 +2366,6 @@ elf64_hppa_finish_dynamic_sections (output_bfd, info)
elf64_hppa_finalize_dlt, elf64_hppa_finalize_dlt,
info); info);
sdyn = bfd_get_section_by_name (dynobj, ".dynamic"); sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
if (elf_hash_table (info)->dynamic_sections_created) if (elf_hash_table (info)->dynamic_sections_created)
@ -2453,7 +2448,6 @@ elf64_hppa_finish_dynamic_sections (output_bfd, info)
return true; return true;
} }
/* Return the number of additional phdrs we will need. /* Return the number of additional phdrs we will need.
The generic ELF code only creates PT_PHDRs for executables. The HP The generic ELF code only creates PT_PHDRs for executables. The HP
@ -2631,7 +2625,6 @@ const struct elf_size_info hppa64_elf_size_info =
#define elf_backend_link_output_symbol_hook \ #define elf_backend_link_output_symbol_hook \
elf64_hppa_link_output_symbol_hook elf64_hppa_link_output_symbol_hook
#define elf_backend_want_got_plt 0 #define elf_backend_want_got_plt 0
#define elf_backend_plt_readonly 0 #define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 0 #define elf_backend_want_plt_sym 0