2000-11-21 Kazu Hirata <kazu@hxi.com>
* coff-a29k.c: Fix formatting. * coff-h8500.c: Likewise. * coff-i960.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-stgo32.c: Likewise. * coff-tic54x.c: Likewise. * coff-w65.c: Likewise. * cpu-h8500.c: Likewise. * cpu-hppa.c: Likewise. * cpu-ns32k.c: Likewise.
This commit is contained in:
parent
1abaf97602
commit
6e301b2bf2
@ -1,6 +1,17 @@
|
||||
2000-11-21 Kazu Hirata <kazu@hxi.com>
|
||||
|
||||
* ecoff.c: Fix formatting.
|
||||
* coff-a29k.c: Fix formatting.
|
||||
* coff-h8500.c: Likewise.
|
||||
* coff-i960.c: Likewise.
|
||||
* coff-ppc.c: Likewise.
|
||||
* coff-rs6000.c: Likewise.
|
||||
* coff-stgo32.c: Likewise.
|
||||
* coff-tic54x.c: Likewise.
|
||||
* coff-w65.c: Likewise.
|
||||
* cpu-h8500.c: Likewise.
|
||||
* cpu-hppa.c: Likewise.
|
||||
* cpu-ns32k.c: Likewise.
|
||||
* ecoff.c: Likewise.
|
||||
* ecofflink.c: Likewise.
|
||||
|
||||
2000-11-21 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
@ -93,7 +93,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
|
||||
long signed_value;
|
||||
|
||||
unsigned long addr = reloc_entry->address ; /*+ input_section->vma*/
|
||||
bfd_byte *hit_data =addr + (bfd_byte *)(data);
|
||||
bfd_byte *hit_data =addr + (bfd_byte *) (data);
|
||||
|
||||
r_type = reloc_entry->howto->type;
|
||||
|
||||
@ -128,7 +128,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
|
||||
switch (r_type)
|
||||
{
|
||||
case R_IREL:
|
||||
insn = bfd_get_32(abfd, hit_data);
|
||||
insn = bfd_get_32 (abfd, hit_data);
|
||||
/* Take the value in the field and sign extend it */
|
||||
signed_value = EXTRACT_HWORD(insn);
|
||||
signed_value = SIGN_EXTEND_HWORD(signed_value);
|
||||
@ -156,17 +156,17 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
|
||||
}
|
||||
signed_value >>= 2;
|
||||
insn = INSERT_HWORD(insn, signed_value);
|
||||
bfd_put_32(abfd, insn ,hit_data);
|
||||
bfd_put_32 (abfd, insn ,hit_data);
|
||||
break;
|
||||
case R_ILOHALF:
|
||||
insn = bfd_get_32(abfd, hit_data);
|
||||
insn = bfd_get_32 (abfd, hit_data);
|
||||
unsigned_value = EXTRACT_HWORD(insn);
|
||||
unsigned_value += sym_value + reloc_entry->addend;
|
||||
insn = INSERT_HWORD(insn, unsigned_value);
|
||||
bfd_put_32(abfd, insn, hit_data);
|
||||
bfd_put_32 (abfd, insn, hit_data);
|
||||
break;
|
||||
case R_IHIHALF:
|
||||
insn = bfd_get_32(abfd, hit_data);
|
||||
insn = bfd_get_32 (abfd, hit_data);
|
||||
/* consth, part 1
|
||||
Just get the symbol value that is referenced */
|
||||
part1_consth_active = true;
|
||||
@ -174,7 +174,7 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
|
||||
/* Don't modify insn until R_IHCONST */
|
||||
break;
|
||||
case R_IHCONST:
|
||||
insn = bfd_get_32(abfd, hit_data);
|
||||
insn = bfd_get_32 (abfd, hit_data);
|
||||
/* consth, part 2
|
||||
Now relocate the reference */
|
||||
if (part1_consth_active == false) {
|
||||
@ -188,26 +188,26 @@ a29k_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
|
||||
unsigned_value = unsigned_value >> 16;
|
||||
insn = INSERT_HWORD(insn, unsigned_value);
|
||||
part1_consth_active = false;
|
||||
bfd_put_32(abfd, insn, hit_data);
|
||||
bfd_put_32 (abfd, insn, hit_data);
|
||||
break;
|
||||
case R_BYTE:
|
||||
insn = bfd_get_8(abfd, hit_data);
|
||||
insn = bfd_get_8 (abfd, hit_data);
|
||||
unsigned_value = insn + sym_value + reloc_entry->addend;
|
||||
if (unsigned_value & 0xffffff00)
|
||||
return(bfd_reloc_overflow);
|
||||
bfd_put_8(abfd, unsigned_value, hit_data);
|
||||
bfd_put_8 (abfd, unsigned_value, hit_data);
|
||||
break;
|
||||
case R_HWORD:
|
||||
insn = bfd_get_16(abfd, hit_data);
|
||||
insn = bfd_get_16 (abfd, hit_data);
|
||||
unsigned_value = insn + sym_value + reloc_entry->addend;
|
||||
if (unsigned_value & 0xffff0000)
|
||||
return(bfd_reloc_overflow);
|
||||
bfd_put_16(abfd, insn, hit_data);
|
||||
bfd_put_16 (abfd, insn, hit_data);
|
||||
break;
|
||||
case R_WORD:
|
||||
insn = bfd_get_32(abfd, hit_data);
|
||||
insn = bfd_get_32 (abfd, hit_data);
|
||||
insn += sym_value + reloc_entry->addend;
|
||||
bfd_put_32(abfd, insn, hit_data);
|
||||
bfd_put_32 (abfd, insn, hit_data);
|
||||
break;
|
||||
default:
|
||||
*error_message = _("Unrecognized reloc");
|
||||
|
||||
@ -223,7 +223,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
|
||||
case R_H8500_IMM24:
|
||||
{
|
||||
int v = bfd_coff_reloc16_get_value(reloc, link_info, input_section);
|
||||
int o = bfd_get_32(in_abfd, data+ *dst_ptr -1);
|
||||
int o = bfd_get_32 (in_abfd, data+ *dst_ptr -1);
|
||||
v = (v & 0x00ffffff) | (o & 0xff00000);
|
||||
bfd_put_32 (in_abfd, v, data + *dst_ptr -1);
|
||||
(*dst_ptr) +=3;
|
||||
|
||||
@ -146,7 +146,7 @@ optcall_callback (abfd, reloc_entry, symbol_in, data,
|
||||
to the correct location. */
|
||||
{
|
||||
union internal_auxent *aux = &((cs->native+2)->u.auxent);
|
||||
int word = bfd_get_32(abfd, (bfd_byte *)data + reloc_entry->address);
|
||||
int word = bfd_get_32 (abfd, (bfd_byte *)data + reloc_entry->address);
|
||||
int olf = (aux->x_bal.x_balntry - cs->native->u.syment.n_value);
|
||||
BFD_ASSERT(cs->native->u.syment.n_numaux==2);
|
||||
|
||||
@ -156,7 +156,7 @@ optcall_callback (abfd, reloc_entry, symbol_in, data,
|
||||
sym and auxents untouched, so the delta between the two
|
||||
is the offset of the bal entry point. */
|
||||
word = ((word + olf) & BAL_MASK) | BAL;
|
||||
bfd_put_32(abfd, word, (bfd_byte *) data + reloc_entry->address);
|
||||
bfd_put_32 (abfd, word, (bfd_byte *) data + reloc_entry->address);
|
||||
}
|
||||
result = bfd_reloc_ok;
|
||||
break;
|
||||
|
||||
@ -85,7 +85,7 @@ extern void dump_toc PARAMS ((PTR));
|
||||
#define HASH_CHECK(addr) \
|
||||
if (strcmp(addr->eye_catcher, EYE) != 0) \
|
||||
{ \
|
||||
fprintf(stderr,\
|
||||
fprintf (stderr,\
|
||||
_("File %s, line %d, Hash check failure, bad eye %8s\n"), \
|
||||
__FILE__, __LINE__, addr->eye_catcher); \
|
||||
abort (); \
|
||||
@ -781,13 +781,13 @@ static reloc_howto_type ppc_coff_howto_table[] =
|
||||
if (i == 0) \
|
||||
{ \
|
||||
i = 1; \
|
||||
fprintf(stderr,_("Unimplemented Relocation -- %s\n"),x); \
|
||||
fprintf (stderr,_("Unimplemented Relocation -- %s\n"),x); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define DUMP_RELOC(n,r) \
|
||||
{ \
|
||||
fprintf(stderr,"%s sym %d, addr %d, addend %d\n", \
|
||||
fprintf (stderr,"%s sym %d, addr %d, addend %d\n", \
|
||||
n, (*(r->sym_ptr_ptr))->name, \
|
||||
r->address, r->addend); \
|
||||
}
|
||||
@ -803,7 +803,7 @@ static reloc_howto_type ppc_coff_howto_table[] =
|
||||
|
||||
#define DUMP_RELOC2(n,r) \
|
||||
{ \
|
||||
fprintf(stderr,"%s sym %d, r_vaddr %d %s\n", \
|
||||
fprintf (stderr,"%s sym %d, r_vaddr %d %s\n", \
|
||||
n, r->r_symndx, r->r_vaddr,\
|
||||
(((r->r_type) & IMAGE_REL_PPC_TOCDEFN) == 0) \
|
||||
?" ":" TOCDEFN" ); \
|
||||
@ -1258,7 +1258,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
priv,
|
||||
strdup(name));
|
||||
|
||||
bfd_put_32(output_bfd,
|
||||
bfd_put_32 (output_bfd,
|
||||
val,
|
||||
toc_section->contents + our_toc_offset);
|
||||
|
||||
@ -1318,7 +1318,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
record_toc(toc_section, our_toc_offset, pub, strdup(name));
|
||||
|
||||
/* write out the toc entry */
|
||||
bfd_put_32(output_bfd,
|
||||
bfd_put_32 (output_bfd,
|
||||
val,
|
||||
toc_section->contents + our_toc_offset);
|
||||
|
||||
@ -1383,8 +1383,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
my_name = h->root.root.root.string;
|
||||
if (h->symbol_is_glue == 1)
|
||||
{
|
||||
x = bfd_get_32(input_bfd, loc);
|
||||
bfd_put_32(input_bfd, h->glue_insn, loc);
|
||||
x = bfd_get_32 (input_bfd, loc);
|
||||
bfd_put_32 (input_bfd, h->glue_insn, loc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1410,13 +1410,13 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
my_name = h->root.root.root.string;
|
||||
}
|
||||
|
||||
fprintf(stderr,
|
||||
fprintf (stderr,
|
||||
_("Warning: unsupported reloc %s <file %s, section %s>\n"),
|
||||
howto->name,
|
||||
bfd_get_filename(input_bfd),
|
||||
input_section->name);
|
||||
|
||||
fprintf(stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
|
||||
fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
|
||||
rel->r_symndx, my_name, (long) rel->r_vaddr,
|
||||
(unsigned long) rel->r_vaddr);
|
||||
}
|
||||
@ -1649,11 +1649,11 @@ dump_toc (vfile)
|
||||
FILE *file = (FILE *) vfile;
|
||||
struct list_ele *t;
|
||||
|
||||
fprintf(file, _(h1));
|
||||
fprintf(file, _(h2));
|
||||
fprintf(file, _(h3));
|
||||
fprintf (file, _(h1));
|
||||
fprintf (file, _(h2));
|
||||
fprintf (file, _(h3));
|
||||
|
||||
for(t = head; t != 0; t=t->next)
|
||||
for (t = head; t != 0; t=t->next)
|
||||
{
|
||||
const char *cat = "";
|
||||
|
||||
@ -1670,22 +1670,22 @@ dump_toc (vfile)
|
||||
cat = _("IAT reference ");
|
||||
else
|
||||
{
|
||||
fprintf(file,
|
||||
fprintf (file,
|
||||
_("**** global_toc_size %ld(%lx), thunk_size %ld(%lx)\n"),
|
||||
global_toc_size, global_toc_size, thunk_size, thunk_size);
|
||||
cat = _("Out of bounds!");
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(file,
|
||||
fprintf (file,
|
||||
" %04lx (%d)", (unsigned long) t->offset, t->offset - 32768);
|
||||
fprintf(file,
|
||||
fprintf (file,
|
||||
" %s %s\n",
|
||||
cat, t->name);
|
||||
|
||||
}
|
||||
|
||||
fprintf(file, "\n");
|
||||
fprintf (file, "\n");
|
||||
}
|
||||
|
||||
boolean
|
||||
@ -2067,7 +2067,7 @@ ppc_coff_rtype2howto (relent, internal)
|
||||
howto = ppc_coff_howto_table + IMAGE_REL_PPC_TOCREL16;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,
|
||||
fprintf (stderr,
|
||||
_("Warning: Unsupported reloc %s [%d] used -- it may not work.\n"),
|
||||
ppc_coff_howto_table[r_type].name,
|
||||
r_type);
|
||||
@ -2142,7 +2142,7 @@ coff_ppc_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
|
||||
howto = ppc_coff_howto_table + r_type;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,
|
||||
fprintf (stderr,
|
||||
_("Warning: Unsupported reloc %s [%d] used -- it may not work.\n"),
|
||||
ppc_coff_howto_table[r_type].name,
|
||||
r_type);
|
||||
|
||||
@ -140,7 +140,7 @@ _bfd_xcoff_swap_sym_in (abfd, ext1, in1)
|
||||
SYMENT *ext = (SYMENT *)ext1;
|
||||
struct internal_syment *in = (struct internal_syment *)in1;
|
||||
|
||||
if(ext->e.e_name[0] != 0)
|
||||
if (ext->e.e_name[0] != 0)
|
||||
{
|
||||
memcpy(in->_n._n_name, ext->e.e_name, SYMNMLEN);
|
||||
}
|
||||
@ -167,7 +167,7 @@ _bfd_xcoff_swap_sym_out (abfd, inp, extp)
|
||||
struct internal_syment *in = (struct internal_syment *)inp;
|
||||
SYMENT *ext =(SYMENT *)extp;
|
||||
|
||||
if(in->_n._n_name[0] != 0)
|
||||
if (in->_n._n_name[0] != 0)
|
||||
{
|
||||
memcpy(ext->e.e_name, in->_n._n_name, SYMNMLEN);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ static boolean
|
||||
|
||||
/* This macro is used, because I cannot assume the endianess of the
|
||||
host system */
|
||||
#define _H(index) (bfd_h_get_16(abfd, (bfd_byte *)(header+index*2)))
|
||||
#define _H(index) (bfd_h_get_16(abfd, (bfd_byte *) (header+index*2)))
|
||||
|
||||
/* These bytes are a 2048-byte DOS executable, which loads the COFF
|
||||
image into memory and then runs it. It is called 'stub' */
|
||||
|
||||
@ -56,9 +56,9 @@ tic54x_putl32 (data, addr)
|
||||
register bfd_byte *addr;
|
||||
{
|
||||
addr[2] = (bfd_byte)data;
|
||||
addr[3] = (bfd_byte)(data >> 8);
|
||||
addr[0] = (bfd_byte)(data >> 16);
|
||||
addr[1] = (bfd_byte)(data >> 24);
|
||||
addr[3] = (bfd_byte) (data >> 8);
|
||||
addr[0] = (bfd_byte) (data >> 16);
|
||||
addr[1] = (bfd_byte) (data >> 24);
|
||||
}
|
||||
|
||||
bfd_signed_vma
|
||||
|
||||
@ -366,7 +366,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
printf(_("ignoring reloc %s\n"), reloc->howto->name);
|
||||
printf (_("ignoring reloc %s\n"), reloc->howto->name);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@ -40,13 +40,13 @@ howto16_callback (abfd, reloc_entry, symbol_in, data,
|
||||
{
|
||||
long relocation = 0;
|
||||
bfd_vma addr = reloc_entry->address;
|
||||
long x = bfd_get_16(abfd, (bfd_byte *)data + addr);
|
||||
long x = bfd_get_16 (abfd, (bfd_byte *)data + addr);
|
||||
|
||||
HOWTO_PREPARE(relocation, symbol_in);
|
||||
|
||||
x = (x + relocation + reloc_entry->addend);
|
||||
|
||||
bfd_put_16(abfd, x, (bfd_byte *)data + addr);
|
||||
bfd_put_16 (abfd, x, (bfd_byte *)data + addr);
|
||||
return bfd_reloc_ok;
|
||||
}
|
||||
|
||||
@ -62,13 +62,13 @@ howto8_callback (abfd, reloc_entry, symbol_in, data,
|
||||
{
|
||||
long relocation = 0;
|
||||
bfd_vma addr = reloc_entry->address;
|
||||
long x = bfd_get_8(abfd, (bfd_byte *)data + addr);
|
||||
long x = bfd_get_8 (abfd, (bfd_byte *)data + addr);
|
||||
|
||||
HOWTO_PREPARE(relocation, symbol_in);
|
||||
|
||||
x = (x + relocation + reloc_entry->addend);
|
||||
|
||||
bfd_put_8(abfd, x, (bfd_byte *)data + addr);
|
||||
bfd_put_8 (abfd, x, (bfd_byte *)data + addr);
|
||||
return bfd_reloc_ok;
|
||||
}
|
||||
|
||||
@ -85,13 +85,13 @@ howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data,
|
||||
long relocation = 0;
|
||||
bfd_vma addr = reloc_entry->address;
|
||||
|
||||
long x = bfd_get_8(abfd, (bfd_byte *)data + addr);
|
||||
long x = bfd_get_8 (abfd, (bfd_byte *)data + addr);
|
||||
abort ();
|
||||
HOWTO_PREPARE(relocation, symbol_in);
|
||||
|
||||
x = (x + relocation + reloc_entry->addend);
|
||||
|
||||
bfd_put_8(abfd, x, (bfd_byte *)data + addr);
|
||||
bfd_put_8 (abfd, x, (bfd_byte *)data + addr);
|
||||
return bfd_reloc_ok;
|
||||
}
|
||||
|
||||
@ -107,13 +107,13 @@ howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data,
|
||||
{
|
||||
long relocation = 0;
|
||||
bfd_vma addr = reloc_entry->address;
|
||||
long x = bfd_get_8(abfd, (bfd_byte *)data + addr);
|
||||
long x = bfd_get_8 (abfd, (bfd_byte *)data + addr);
|
||||
abort ();
|
||||
HOWTO_PREPARE(relocation, symbol_in);
|
||||
|
||||
x = (x + relocation + reloc_entry->addend);
|
||||
|
||||
bfd_put_8(abfd, x, (bfd_byte *)data + addr);
|
||||
bfd_put_8 (abfd, x, (bfd_byte *)data + addr);
|
||||
return bfd_reloc_ok;
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ static const bfd_arch_info_type bfd_hppa10_arch =
|
||||
"hppa1.0",
|
||||
3,
|
||||
true, /* Unless we use 1.1 specific features */
|
||||
bfd_default_compatible,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan ,
|
||||
0,
|
||||
};
|
||||
@ -49,7 +49,7 @@ static const bfd_arch_info_type bfd_hppa20_arch =
|
||||
"hppa2.0",
|
||||
3,
|
||||
false, /* Unless we use 1.1 specific features */
|
||||
bfd_default_compatible,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan ,
|
||||
&bfd_hppa10_arch,
|
||||
};
|
||||
@ -66,7 +66,7 @@ static const bfd_arch_info_type bfd_hppa20w_arch =
|
||||
"hppa2.0w",
|
||||
3,
|
||||
false, /* Unless we use 1.1 specific features */
|
||||
bfd_default_compatible,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan ,
|
||||
&bfd_hppa20_arch,
|
||||
};
|
||||
@ -82,7 +82,7 @@ const bfd_arch_info_type bfd_hppa_arch =
|
||||
"hppa1.1",
|
||||
3,
|
||||
false, /* 1.1 specific features used */
|
||||
bfd_default_compatible,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan ,
|
||||
&bfd_hppa20w_arch,
|
||||
};
|
||||
|
||||
@ -174,8 +174,8 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
|
||||
asection *input_section;
|
||||
bfd *output_bfd;
|
||||
char **error_message ATTRIBUTE_UNUSED;
|
||||
long (*get_data)();
|
||||
int (*put_data)();
|
||||
long (*get_data) ();
|
||||
int (*put_data) ();
|
||||
{
|
||||
int overflow = 0;
|
||||
bfd_vma relocation;
|
||||
@ -596,8 +596,8 @@ _bfd_do_ns32k_reloc_contents ( howto, input_bfd, relocation, location,
|
||||
bfd *input_bfd ATTRIBUTE_UNUSED;
|
||||
bfd_vma relocation;
|
||||
bfd_byte *location;
|
||||
long (*get_data)();
|
||||
int (*put_data)();
|
||||
long (*get_data) ();
|
||||
int (*put_data) ();
|
||||
{
|
||||
int size;
|
||||
bfd_vma x;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user