+2000-12-12 Nick Clifton <nickc@redhat.com>
+
+ * cpu-sh.c: Fix formattng.
+ * elf.c: Fix formattng.
+ * elf32-mips.c: Fix formattng.
+ * elf32-sh.c: Fix formattng.
+ * elf64-alpha.c: Fix formattng.
+
2000-12-09 Nick Clifton <nickc@redhat.com>
* elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
}
#endif
-#define SH_NEXT &arch_info_struct[0]
-#define SH2_NEXT &arch_info_struct[1]
-#define SH_DSP_NEXT &arch_info_struct[2]
-#define SH3_NEXT &arch_info_struct[3]
+#define SH_NEXT &arch_info_struct[0]
+#define SH2_NEXT &arch_info_struct[1]
+#define SH_DSP_NEXT &arch_info_struct[2]
+#define SH3_NEXT &arch_info_struct[3]
#define SH3_DSP_NEXT &arch_info_struct[4]
-#define SH3E_NEXT &arch_info_struct[5]
-#define SH4_NEXT NULL
+#define SH3E_NEXT &arch_info_struct[5]
+#define SH4_NEXT NULL
static const bfd_arch_info_type arch_info_struct[] =
{
break;
case bfd_arch_i386:
if (bfd_get_arch_size (abfd) == 64)
- i_ehdrp->e_machine = EM_X86_64;
+ i_ehdrp->e_machine = EM_X86_64;
else
- i_ehdrp->e_machine = EM_386;
+ i_ehdrp->e_machine = EM_386;
break;
case bfd_arch_ia64:
i_ehdrp->e_machine = EM_IA_64;
/* This structure is used to hold .got information when linking. It
is stored in the tdata field of the bfd_elf_section_data structure. */
-struct mips_got_info {
+struct mips_got_info
+{
/* The global symbol in the GOT with the lowest index in the dynamic
symbol table. */
struct elf_link_hash_entry *global_gotsym;
/* The MIPS ELF linker needs additional information for each symbol in
the global hash table. */
-struct mips_elf_link_hash_entry {
+struct mips_elf_link_hash_entry
+{
struct elf_link_hash_entry root;
/* External symbol information. */
/* Names of sections which appear in the .dynsym section in an Irix 5
executable. */
-static const char * const mips_elf_dynsym_sec_names[] = {
+static const char * const mips_elf_dynsym_sec_names[] =
+{
".text",
".init",
".fini",
/* The names of the runtime procedure table symbols used on Irix 5. */
-static const char * const mips_elf_dynsym_rtproc_names[] = {
+static const char * const mips_elf_dynsym_rtproc_names[] =
+{
"_procedure_table",
"_procedure_string_table",
"_procedure_table_size",
/* These structures are used to generate the .compact_rel section on
Irix 5. */
-typedef struct {
+typedef struct
+{
unsigned long id1; /* Always one? */
unsigned long num; /* Number of compact relocation entries. */
unsigned long id2; /* Always two? */
unsigned long reserved1; /* Zero? */
} Elf32_compact_rel;
-typedef struct {
+typedef struct
+{
bfd_byte id1[4];
bfd_byte num[4];
bfd_byte id2[4];
bfd_byte reserved1[4];
} Elf32_External_compact_rel;
-typedef struct {
+typedef struct
+{
unsigned int ctype : 1; /* 1: long 0: short format. See below. */
unsigned int rtype : 4; /* Relocation types. See below. */
unsigned int dist2to : 8;
unsigned long vaddr; /* VADDR to be relocated. */
} Elf32_crinfo;
-typedef struct {
+typedef struct
+{
unsigned int ctype : 1; /* 1: long 0: short format. See below. */
unsigned int rtype : 4; /* Relocation types. See below. */
unsigned int dist2to : 8;
unsigned long konst; /* KONST field. See below. */
} Elf32_crinfo2;
-typedef struct {
+typedef struct
+{
bfd_byte info[4];
bfd_byte konst[4];
bfd_byte vaddr[4];
} Elf32_External_crinfo;
-typedef struct {
+typedef struct
+{
bfd_byte info[4];
bfd_byte konst[4];
} Elf32_External_crinfo2;
from smaller values. Start with zero, widen, *then* decrement. */
#define MINUS_ONE (((bfd_vma)0) - 1)
-static reloc_howto_type elf_mips_howto_table[] = {
+static reloc_howto_type elf_mips_howto_table[] =
+{
/* No relocation. */
HOWTO (R_MIPS_NONE, /* type */
0, /* rightshift */
reloc. This extension permits gcc to output the HI and LO relocs
itself. */
-struct mips_hi16 {
+struct mips_hi16
+{
struct mips_hi16 *next;
bfd_byte *addr;
bfd_vma addend;
enum elf_mips_reloc_type elf_reloc_val;
};
-static CONST struct elf_reloc_map mips_reloc_map[] = {
+static CONST struct elf_reloc_map mips_reloc_map[] =
+{
{ BFD_RELOC_NONE, R_MIPS_NONE, },
{ BFD_RELOC_16, R_MIPS_16 },
{ BFD_RELOC_32, R_MIPS_32 },
if (m != NULL
&& m->count == 1 && strcmp (m->sections[0]->name, ".dynamic") == 0)
{
- static const char *sec_names[] = {
+ static const char *sec_names[] =
+ {
".dynamic", ".dynstr", ".dynsym", ".hash"
};
bfd_vma low, high;
/* MIPS ELF uses a special find_nearest_line routine in order the
handle the ECOFF debugging information. */
-struct mips_elf_find_line {
+struct mips_elf_find_line
+{
struct ecoff_debug_info d;
struct ecoff_find_line i;
};
/* MIPS ELF linker hash table. */
-struct mips_elf_link_hash_table {
+struct mips_elf_link_hash_table
+{
struct elf_link_hash_table root;
#if 0
/* We no longer use this. */
/* Structure used to pass information to mips_elf_output_extsym. */
-struct extsym_info {
+struct extsym_info
+{
bfd *abfd;
struct bfd_link_info *info;
struct ecoff_debug_info *debug;
EXTR esym;
bfd_vma last;
unsigned int i;
- static const char * const name[] = {
+ static const char * const name[] =
+ {
".text", ".init", ".fini", ".data",
".rodata", ".sdata", ".sbss", ".bss"
};
- static const int sc[] = {
+ static const int sc[] =
+ {
scText, scInit, scFini, scData,
scRData, scSData, scSBss, scBss
};
/* This structure is passed to mips_elf_sort_hash_table_f when sorting
the dynamic symbols. */
-struct mips_elf_hash_sort_data {
+struct mips_elf_hash_sort_data
+{
/* The symbol in the global GOT with the lowest dynamic symbol table
index. */
struct elf_link_hash_entry *low;
value = (((value & 0x1f0000) << 5)
| ((value & 0x3e00000) >> 5)
| (value & 0xffff));
-
}
else if (r_type == R_MIPS16_GPREL)
{
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
-static reloc_howto_type sh_elf_howto_table[] = {
+static reloc_howto_type sh_elf_howto_table[] =
+{
/* No relocation. */
HOWTO (R_SH_NONE, /* type */
0, /* rightshift */
/* This structure is used to map BFD reloc codes to SH ELF relocs. */
-struct elf_reloc_map {
+struct elf_reloc_map
+{
bfd_reloc_code_real_type bfd_reloc_val;
unsigned char elf_reloc_val;
};
/* An array mapping BFD reloc codes to SH ELF relocs. */
-static const struct elf_reloc_map sh_reloc_map[] = {
+static const struct elf_reloc_map sh_reloc_map[] =
+{
{ BFD_RELOC_NONE, R_SH_NONE },
{ BFD_RELOC_32, R_SH_DIR32 },
{ BFD_RELOC_CTOR, R_SH_DIR32 },
/* First entry in an absolute procedure linkage table look like this. */
-static const bfd_byte elf_sh_plt0_entry_be[PLT_ENTRY_SIZE] = {
+static const bfd_byte elf_sh_plt0_entry_be[PLT_ENTRY_SIZE] =
+{
0xd0, 0x04, /* mov.l 1f,r0 */
0xd2, 0x05, /* mov.l 2f,r2 */
0x60, 0x02, /* mov.l @r0,r0 */
0, 0, 0, 0, /* 2: replaced with address of .got.plt + 4. */
};
-static const bfd_byte elf_sh_plt0_entry_le[PLT_ENTRY_SIZE] = {
+static const bfd_byte elf_sh_plt0_entry_le[PLT_ENTRY_SIZE] =
+{
0x04, 0xd0, /* mov.l 1f,r0 */
0x05, 0xd2, /* mov.l 2f,r2 */
0x02, 0x60, /* mov.l @r0,r0 */
/* Sebsequent entries in an absolute procedure linkage table look like
this. */
-static const bfd_byte elf_sh_plt_entry_be[PLT_ENTRY_SIZE] = {
+static const bfd_byte elf_sh_plt_entry_be[PLT_ENTRY_SIZE] =
+{
0xd0, 0x04, /* mov.l 1f,r0 */
0x60, 0x02, /* mov.l @r0,r0 */
0xd2, 0x02, /* mov.l 0f,r2 */
0, 0, 0, 0, /* 2: replaced with offset into relocation table. */
};
-static const bfd_byte elf_sh_plt_entry_le[PLT_ENTRY_SIZE] = {
+static const bfd_byte elf_sh_plt_entry_le[PLT_ENTRY_SIZE] =
+{
0x04, 0xd0, /* mov.l 1f,r0 */
0x02, 0x60, /* mov.l @r0,r0 */
0x02, 0xd2, /* mov.l 0f,r2 */
/* Entries in a PIC procedure linkage table look like this. */
-static const bfd_byte elf_sh_pic_plt_entry_be[PLT_ENTRY_SIZE] = {
+static const bfd_byte elf_sh_pic_plt_entry_be[PLT_ENTRY_SIZE] =
+{
0xd0, 0x04, /* mov.l 1f,r0 */
0x00, 0xce, /* mov.l @(r0,r12),r0 */
0x40, 0x2b, /* jmp @r0 */
0, 0, 0, 0 /* 2: replaced with offset into relocation table. */
};
-static const bfd_byte elf_sh_pic_plt_entry_le[PLT_ENTRY_SIZE] = {
+static const bfd_byte elf_sh_pic_plt_entry_le[PLT_ENTRY_SIZE] =
+{
0x04, 0xd0, /* mov.l 1f,r0 */
0xce, 0x00, /* mov.l @(r0,r12),r0 */
0x2b, 0x40, /* jmp @r0 */
/* This structure keeps track of the number of PC relative relocs we
have copied for a given symbol. */
-struct elf_sh_pcrel_relocs_copied {
+struct elf_sh_pcrel_relocs_copied
+{
/* Next section. */
struct elf_sh_pcrel_relocs_copied *next;
/* A section in dynobj. */
/* sh ELF linker hash entry. */
-struct elf_sh_link_hash_entry {
+struct elf_sh_link_hash_entry
+{
struct elf_link_hash_entry root;
/* Number of PC relative relocs copied for this symbol. */
/* sh ELF linker hash table. */
-struct elf_sh_link_hash_table {
+struct elf_sh_link_hash_table
+{
struct elf_link_hash_table root;
};
&& ELF_ST_BIND (sym->st_info) != STB_LOCAL)
&& ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
&& sym->st_shndx != SHN_COMMON))
- {
- return bfd_section_from_elf_index (abfd, sym->st_shndx);
- }
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
}
return NULL;
}
static boolean
sh_elf_copy_private_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+ bfd * ibfd;
+ bfd * obfd;
{
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return true;
#define elf_backend_size_info \
alpha_elf_size_info
-/*
- * A few constants that determine how the .plt section is set up.
- */
+/* A few constants that determine how the .plt section is set up. */
#define elf_backend_want_got_plt 0
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 1