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

* elf32-ppc.c: Fix formatting.
	* elf64-x86-64.c: Likewise.
This commit is contained in:
Kazu Hirata
2000-12-07 19:31:48 +00:00
parent e6c42fda06
commit 8da6118f7b
3 changed files with 241 additions and 246 deletions

View File

@ -1,3 +1,8 @@
2000-12-07 Kazu Hirata <kazu@hxi.com>
* elf32-ppc.c: Fix formatting.
* elf64-x86-64.c: Likewise.
2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
From Ralf Baechle <ralf@gnu.org>

View File

@ -143,8 +143,7 @@ static boolean ppc_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_i
static reloc_howto_type *ppc_elf_howto_table[(int) R_PPC_max];
static reloc_howto_type ppc_elf_howto_raw[] =
{
static reloc_howto_type ppc_elf_howto_raw[] = {
/* This reloc does nothing. */
HOWTO (R_PPC_NONE, /* type */
0, /* rightshift */
@ -947,7 +946,6 @@ static reloc_howto_type ppc_elf_howto_raw[] =
0xffff, /* dst_mask */
false), /* pcrel_offset */
};
/* Initialize the ppc_elf_howto_table, so that linear accesses can be done. */
@ -963,7 +961,6 @@ ppc_elf_howto_init ()
ppc_elf_howto_table[type] = &ppc_elf_howto_raw[i];
}
}
/* This function handles relaxing for the PPC with option --mpc860c0[=<n>].
@ -1241,7 +1238,6 @@ error_return:
free (free_contents);
return false;
}
static reloc_howto_type *
ppc_elf_reloc_type_lookup (abfd, code)
@ -1251,7 +1247,7 @@ ppc_elf_reloc_type_lookup (abfd, code)
enum elf_ppc_reloc_type ppc_reloc = R_PPC_NONE;
if (!ppc_elf_howto_table[R_PPC_ADDR32])
/* Initialize howto table if needed */
/* Initialize howto table if needed. */
ppc_elf_howto_init ();
switch ((int) code)
@ -1325,7 +1321,8 @@ ppc_elf_info_to_howto (abfd, cache_ptr, dst)
arelent *cache_ptr;
Elf32_Internal_Rela *dst;
{
if (!ppc_elf_howto_table[ R_PPC_ADDR32 ]) /* Initialize howto table if needed */
if (!ppc_elf_howto_table[R_PPC_ADDR32])
/* Initialize howto table if needed. */
ppc_elf_howto_init ();
BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_PPC_max);
@ -1608,10 +1605,9 @@ ppc_elf_create_linker_section (abfd, info, which)
return lsect;
}
/* If we have a non-zero sized .sbss2 or .PPC.EMB.sbss0 sections, we need to bump up
the number of section headers. */
/* If we have a non-zero sized .sbss2 or .PPC.EMB.sbss0 sections, we
need to bump up the number of section headers. */
static int
ppc_elf_additional_program_headers (abfd)
@ -1637,7 +1633,7 @@ ppc_elf_additional_program_headers (abfd)
return ret;
}
/* Modify the segment map if needed */
/* Modify the segment map if needed. */
static boolean
ppc_elf_modify_segment_map (abfd)
@ -1876,7 +1872,6 @@ ppc_elf_adjust_dynamic_symbol (info, h)
return true;
}
/* Set the sizes of the dynamic sections. */
@ -2623,7 +2618,6 @@ ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
return true;
}
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
@ -2784,7 +2778,6 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
return true;
}
/* Finish up the dynamic sections. */
@ -2872,7 +2865,6 @@ ppc_elf_finish_dynamic_sections (output_bfd, info)
return true;
}
/* The RELOCATE_SECTION function is called by the ELF backend linker
to handle the relocations for a section.
@ -2937,7 +2929,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
(info->relocateable) ? " (relocatable)" : "");
#endif
if (!ppc_elf_howto_table[ R_PPC_ADDR32 ]) /* Initialize howto table if needed */
if (!ppc_elf_howto_table[R_PPC_ADDR32])
/* Initialize howto table if needed. */
ppc_elf_howto_init ();
local_got_offsets = elf_local_got_offsets (input_bfd);
@ -2965,7 +2958,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
int will_become_local;
/* Unknown relocation handling */
if ((unsigned)r_type >= (unsigned)R_PPC_max || !ppc_elf_howto_table[(int)r_type])
if ((unsigned) r_type >= (unsigned) R_PPC_max
|| !ppc_elf_howto_table[(int) r_type])
{
(*_bfd_error_handler) (_("%s: unknown relocation type %d"),
bfd_get_filename (input_bfd),
@ -3551,7 +3545,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ sdata->sym_hash->root.u.def.section->output_offset);
}
else if (strcmp (name, ".sdata2") == 0 || strcmp (name, ".sbss2") == 0)
else if (strcmp (name, ".sdata2") == 0
|| strcmp (name, ".sbss2") == 0)
{
reg = 2;
addend -= (sdata2->sym_hash->root.u.def.value
@ -3559,7 +3554,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ sdata2->sym_hash->root.u.def.section->output_offset);
}
else if (strcmp (name, ".PPC.EMB.sdata0") == 0 || strcmp (name, ".PPC.EMB.sbss0") == 0)
else if (strcmp (name, ".PPC.EMB.sdata0") == 0
|| strcmp (name, ".PPC.EMB.sbss0") == 0)
{
reg = 0;
}
@ -3717,7 +3713,6 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
return ret;
}
#define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec
#define TARGET_LITTLE_NAME "elf32-powerpcle"

View File

@ -34,8 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* The relocation "howto" table. Order of fields:
type, size, bitsize, pc_relative, complain_on_overflow, special_function,
name, partial_inplace, src_mask, dst_pack, pcrel_offset */
static reloc_howto_type x86_64_elf_howto_table[] =
{
static reloc_howto_type x86_64_elf_howto_table[] = {
HOWTO(R_X86_64_NONE, 0,0, 0,false,0,complain_overflow_dont, 0, "R_X86_64_NONE", false,0x00000000,0x00000000,false),
HOWTO(R_X86_64_64, 0,4,64,false,0,complain_overflow_bitfield,0, "R_X86_64_64", false,MINUS_ONE ,MINUS_ONE ,false),
HOWTO(R_X86_64_PC32, 0,4,32,true ,0,complain_overflow_signed ,0, "R_X86_64_PC32", false,0xffffffff,0xffffffff,true),
@ -80,7 +79,6 @@ static CONST struct elf_reloc_map x86_64_reloc_map[] =
{ BFD_RELOC_8_PCREL, R_X86_64_PC8, },
};
static reloc_howto_type *elf64_x86_64_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static void elf64_x86_64_info_to_howto
@ -108,8 +106,8 @@ elf64_x86_64_reloc_type_lookup (abfd, code)
return 0;
}
/* Given an x86_64 ELF reloc type, fill in an arelent structure. */
static void
elf64_x86_64_info_to_howto (abfd, cache_ptr, dst)
bfd *abfd ATTRIBUTE_UNUSED;
@ -129,12 +127,10 @@ elf64_x86_64_info_to_howto (abfd, cache_ptr, dst)
/* x86_64 ELF linker hash table. */
struct elf64_x86_64_link_hash_table
{
struct elf64_x86_64_link_hash_table {
struct elf_link_hash_table root;
};
/* Get the X86-64 ELF linker hash table from a link_info structure. */
#define elf64_x86_64_hash_table(p) \
@ -338,7 +334,6 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
return true;
}
#define TARGET_LITTLE_SYM bfd_elf64_x86_64_vec
#define TARGET_LITTLE_NAME "elf64-x86-64"
#define ELF_ARCH bfd_arch_i386