* 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.
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>
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;
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);
}
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;
/* 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) {
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");
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;
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);
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;
#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 (); \
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); \
}
#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" ); \
priv,
strdup(name));
- bfd_put_32(output_bfd,
+ bfd_put_32 (output_bfd,
val,
toc_section->contents + our_toc_offset);
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);
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);
}
}
}
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);
}
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 = "";
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
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);
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);
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);
}
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);
}
/* 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' */
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
}
break;
default:
- printf(_("ignoring reloc %s\n"), reloc->howto->name);
+ printf (_("ignoring reloc %s\n"), reloc->howto->name);
break;
}
{
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;
}
{
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;
}
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;
}
{
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;
}
"hppa1.0",
3,
true, /* Unless we use 1.1 specific features */
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
0,
};
"hppa2.0",
3,
false, /* Unless we use 1.1 specific features */
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
&bfd_hppa10_arch,
};
"hppa2.0w",
3,
false, /* Unless we use 1.1 specific features */
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
&bfd_hppa20_arch,
};
"hppa1.1",
3,
false, /* 1.1 specific features used */
- bfd_default_compatible,
+ bfd_default_compatible,
bfd_default_scan ,
&bfd_hppa20w_arch,
};
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;
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;