* aix386-core.c: Fix formatting.
* aout-adobe.c: Likewise.
* aout-arm.c: Likewise.
* aout-encap.c: Likewise.
* aout-ns32k.c: Likewise.
* aout-target.h: Likewise.
* aout-tic30.c: Likewise.
* aoutf1.h: Likewise.
* aoutx.h: Likewise.
* archive.c: Likewise.
+2000-11-20 Kazu Hirata <kazu@hxi.com>
+
+ * aix386-core.c: Fix formatting.
+ * aout-adobe.c: Likewise.
+ * aout-arm.c: Likewise.
+ * aout-encap.c: Likewise.
+ * aout-ns32k.c: Likewise.
+ * aout-target.h: Likewise.
+ * aout-tic30.c: Likewise.
+ * aoutf1.h: Likewise.
+ * aoutx.h: Likewise.
+ * archive.c: Likewise.
+
2000-11-17 H.J. Lu <hjl@gnu.org>
* elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
core_reg2sec (abfd)->flags = SEC_HAS_CONTENTS;
- core_regsec (abfd)->_raw_size = sizeof(core->cd_regs);
- core_reg2sec (abfd)->_raw_size = sizeof(core->cd_fpregs);
+ core_regsec (abfd)->_raw_size = sizeof (core->cd_regs);
+ core_reg2sec (abfd)->_raw_size = sizeof (core->cd_fpregs);
core_regsec (abfd)->vma = -1;
core_reg2sec (abfd)->vma = -1;
/* If somebody calls any byte-swapping routines, shoot them. */
static void
-swap_abort()
+swap_abort ()
{
- abort(); /* This way doesn't require any declaration for ANSI to fuck up */
+ abort (); /* This way doesn't require any declaration for ANSI to fuck up */
}
#define NO_GET ((PROTO(bfd_vma, (*), ( const bfd_byte *))) swap_abort )
#define NO_GETS ((PROTO(bfd_signed_vma, (*), (const bfd_byte *))) swap_abort )
/* Now write out reloc info, followed by syms and strings */
if (bfd_get_symcount (abfd) != 0)
{
- if (bfd_seek (abfd, (file_ptr)(N_SYMOFF(*exec_hdr(abfd))), SEEK_SET)
+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*exec_hdr(abfd))), SEEK_SET)
!= 0)
return false;
if (! aout_32_write_syms (abfd))
return false;
- if (bfd_seek (abfd, (file_ptr)(N_TRELOFF(*exec_hdr(abfd))), SEEK_SET)
+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF(*exec_hdr(abfd))), SEEK_SET)
!= 0)
return false;
}
}
- if (bfd_seek (abfd, (file_ptr)(N_DRELOFF(*exec_hdr(abfd))), SEEK_SET)
+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF(*exec_hdr(abfd))), SEEK_SET)
!= 0)
return false;
bfd *ignore_abfd ATTRIBUTE_UNUSED;
boolean ignore ATTRIBUTE_UNUSED;
{
- return sizeof(struct internal_exec);
+ return sizeof (struct internal_exec);
}
/* Build the transfer vector for Adobe A.Out files. */
#define RELOC_ARM_BITS_NEG_LITTLE ((unsigned int) 0x10)
reloc_howto_type *
-MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel)
+MY(reloc_howto) (abfd, rel, r_index, r_extern, r_pcrel)
bfd *abfd;
struct reloc_std_external *rel;
int *r_index;
MY(reloc_howto) (BFD, REL, &IN, &EX, &PC)
void
-MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc)
+MY(put_reloc) (abfd, r_extern, r_index, value, howto, reloc)
bfd *abfd;
int r_extern;
int r_index;
}
#define MY_put_reloc(BFD, EXT, IDX, VAL, HOWTO, RELOC) \
- MY(put_reloc)(BFD, EXT, IDX, VAL, HOWTO, RELOC)
+ MY(put_reloc) (BFD, EXT, IDX, VAL, HOWTO, RELOC)
void
-MY(relocatable_reloc)(howto, abfd, reloc, amount, r_addr)
+MY(relocatable_reloc) (howto, abfd, reloc, amount, r_addr)
reloc_howto_type *howto;
bfd *abfd;
struct reloc_std_external *reloc;
}
#define MY_relocatable_reloc(HOW, BFD, REL, AMOUNT, ADDR) \
- MY(relocatable_reloc)(HOW, BFD, REL, &(AMOUNT), ADDR)
+ MY(relocatable_reloc) (HOW, BFD, REL, &(AMOUNT), ADDR)
static bfd_reloc_status_type
MY(fix_pcrel_26_done) (abfd, reloc_entry, symbol, data, input_section,
}
reloc_howto_type *
-MY(bfd_reloc_type_lookup)(abfd,code)
+MY(bfd_reloc_type_lookup) (abfd,code)
bfd *abfd;
bfd_reloc_code_real_type code;
{
if (coff_magic != COFF_MAGIC)
return 0; /* Not an encap coff file */
- __header_offset_temp==COFF_MAGIC ? sizeof(struct coffheader) : 0)
+ __header_offset_temp==COFF_MAGIC ? sizeof (struct coffheader) : 0)
(fseek ((f), HEADER_OFFSET((f)), 1))
magic = bfd_h_get_32 (abfd, magicbuf);
bfd_set_error (bfd_error_wrong_format);
return 0;
}
- NAME(aout,swap_exec_header_in)(abfd, &exec_bytes, &exec);
+ NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec);
return aout_32_some_aout_object_p (abfd, &exec, encap_realcallback);
}
{
struct internal_exec *execp = exec_hdr (abfd);
- MY(callback)(abfd, execp);
+ MY(callback) (abfd, execp);
/* If we have a coff header, it can give us better values for
text_start and exec_data_start. This is particularly useful
#define RELOC_STD_BITS_NS32K_TYPE_SH_LITTLE 5
reloc_howto_type *
-MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel)
+MY(reloc_howto) (abfd, rel, r_index, r_extern, r_pcrel)
bfd *abfd ATTRIBUTE_UNUSED;
struct reloc_std_external *rel;
int *r_index;
return (MY(howto_table) + r_length + 3 * (*r_pcrel) + 6 * r_ns32k_type);
}
-#define MY_reloc_howto(BFD,REL,IN,EX,PC) MY(reloc_howto)(BFD, REL, &IN, &EX, &PC)
+#define MY_reloc_howto(BFD,REL,IN,EX,PC) MY(reloc_howto) (BFD, REL, &IN, &EX, &PC)
void
-MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc)
+MY(put_reloc) (abfd, r_extern, r_index, value, howto, reloc)
bfd *abfd;
int r_extern;
int r_index;
}
#define MY_put_reloc(BFD, EXT, IDX, VAL, HOWTO, RELOC) \
- MY(put_reloc)(BFD, EXT, IDX, VAL, HOWTO, RELOC)
+ MY(put_reloc) (BFD, EXT, IDX, VAL, HOWTO, RELOC)
#define STAT_FOR_EXEC
#include <aoutx.h>
reloc_howto_type *
-MY(bfd_reloc_type_lookup)(abfd,code)
+MY(bfd_reloc_type_lookup) (abfd,code)
bfd *abfd;
bfd_reloc_code_real_type code;
{
if (!(MACHTYPE_OK (N_MACHTYPE (exec)))) return 0;
#endif
- NAME(aout,swap_exec_header_in)(abfd, &exec_bytes, &exec);
+ NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec);
#ifdef SWAP_MAGIC
/* swap_exec_header_in read in a_info with the wrong byte order */
MY(mkobject) (abfd)
bfd *abfd;
{
- if (NAME(aout,mkobject)(abfd) == false)
+ if (NAME(aout,mkobject) (abfd) == false)
return false;
#if 0 /* Sizes get set in set_sizes callback, later, after we know
the architecture and machine. */
/* These macros will get 24-bit values from the bfd definition.
Big-endian only. */
-#define bfd_getb_24(BFD,ADDR) (bfd_get_8(BFD,ADDR) << 16) | \
- (bfd_get_8(BFD,ADDR+1) << 8) | \
- (bfd_get_8(BFD,ADDR+2))
-
-#define bfd_putb_24(BFD,DATA,ADDR) bfd_put_8(BFD,(bfd_byte)((DATA >> 16) & 0xFF),ADDR); \
- bfd_put_8(BFD,(bfd_byte)((DATA >> 8) & 0xFF),ADDR+1); \
- bfd_put_8(BFD,(bfd_byte)(DATA & 0xFF),ADDR+2)
+#define bfd_getb_24(BFD,ADDR) \
+ (bfd_get_8 (BFD, ADDR ) << 16) | \
+ (bfd_get_8 (BFD, ADDR + 1) << 8) | \
+ (bfd_get_8 (BFD, ADDR + 2) )
+
+#define bfd_putb_24(BFD,DATA,ADDR) \
+ bfd_put_8 (BFD, (bfd_byte) ((DATA >> 16) & 0xFF), ADDR ); \
+ bfd_put_8 (BFD, (bfd_byte) ((DATA >> 8) & 0xFF), ADDR + 1); \
+ bfd_put_8 (BFD, (bfd_byte) ( DATA & 0xFF), ADDR + 2)
/* Set parameters about this a.out file that are machine-dependent.
This routine is called from some_aout_object_p just before it returns. */
}
#define SET_ARCH_MACH(ABFD, EXEC) \
- NAME(sunos,set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \
+ NAME(sunos,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
choose_reloc_size(ABFD);
/* Determine the size of a relocation entry, based on the architecture */
HOWTO(40, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"BASEREL", false, 0,0x00000000, false),
};
-#define TABLE_SIZE(TABLE) (sizeof(TABLE)/sizeof(TABLE[0]))
+#define TABLE_SIZE(TABLE) (sizeof (TABLE)/sizeof (TABLE[0]))
reloc_howto_type *
NAME(aout,reloc_type_lookup) (abfd,code)
SYNOPSIS
const bfd_target *aout_@var{size}_some_aout_object_p
(bfd *abfd,
- const bfd_target *(*callback_to_real_object_p)());
+ const bfd_target *(*callback_to_real_object_p) ());
DESCRIPTION
Some a.out variant thinks that the file open in @var{abfd}
header, should cope with them in this callback as well. */
#endif /* DOCUMENTATION */
- result = (*callback_to_real_object_p)(abfd);
+ result = (*callback_to_real_object_p) (abfd);
/* Now that the segment addresses have been worked out, take a better
guess at whether the file is executable. If the entry point
unsigned int counter = 0;
aout_symbol_type *symbase;
- if (!NAME(aout,slurp_symbol_table)(abfd))
+ if (!NAME(aout,slurp_symbol_table) (abfd))
return -1;
for (symbase = obj_aout_symbols(abfd); counter++ < bfd_get_symcount (abfd);)
- *(location++) = (asymbol *)( symbase++);
+ *(location++) = (asymbol *) ( symbase++);
*location++ =0;
return bfd_get_symcount (abfd);
}
return 0;
}
- if (!(tblptr || NAME(aout,slurp_reloc_table)(abfd, section, symbols)))
+ if (!(tblptr || NAME(aout,slurp_reloc_table) (abfd, section, symbols)))
return -1;
if (section->flags & SEC_CONSTRUCTOR) {
NAME(aout,get_symtab_upper_bound) (abfd)
bfd *abfd;
{
- if (!NAME(aout,slurp_symbol_table)(abfd))
+ if (!NAME(aout,slurp_symbol_table) (abfd))
return -1;
return (bfd_get_symcount (abfd)+1) * (sizeof (aout_symbol_type *));
}
ret->type = '-';
ret->stab_type = type_code;
- ret->stab_other = (unsigned)(aout_symbol(symbol)->other & 0xff);
- ret->stab_desc = (unsigned)(aout_symbol(symbol)->desc & 0xffff);
+ ret->stab_other = (unsigned) (aout_symbol(symbol)->other & 0xff);
+ ret->stab_desc = (unsigned) (aout_symbol(symbol)->desc & 0xffff);
ret->stab_name = stab_name;
}
}
fprintf(file,"%s", symbol->name);
break;
case bfd_print_symbol_more:
- fprintf(file,"%4x %2x %2x",(unsigned)(aout_symbol(symbol)->desc & 0xffff),
- (unsigned)(aout_symbol(symbol)->other & 0xff),
- (unsigned)(aout_symbol(symbol)->type));
+ fprintf(file,"%4x %2x %2x",(unsigned) (aout_symbol(symbol)->desc & 0xffff),
+ (unsigned) (aout_symbol(symbol)->other & 0xff),
+ (unsigned) (aout_symbol(symbol)->type));
break;
case bfd_print_symbol_all:
{
fprintf(file," %-5s %04x %02x %02x",
section_name,
- (unsigned)(aout_symbol(symbol)->desc & 0xffff),
- (unsigned)(aout_symbol(symbol)->other & 0xff),
- (unsigned)(aout_symbol(symbol)->type & 0xff));
+ (unsigned) (aout_symbol(symbol)->desc & 0xffff),
+ (unsigned) (aout_symbol(symbol)->other & 0xff),
+ (unsigned) (aout_symbol(symbol)->type & 0xff));
if (symbol->name)
fprintf(file," %s", symbol->name);
}
*line_ptr = 0;
if (symbols != (asymbol **)NULL) {
for (p = symbols; *p; p++) {
- aout_symbol_type *q = (aout_symbol_type *)(*p);
+ aout_symbol_type *q = (aout_symbol_type *) (*p);
next:
switch (q->type){
case N_TEXT:
p++;
if (*p == NULL)
break;
- q = (aout_symbol_type *)(*p);
+ q = (aout_symbol_type *) (*p);
if (q->type != (int)N_SO)
goto next;
#define ar_padchar(abfd) ((abfd)->xvec->ar_pad_char)
#define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen)
-#define arch_eltdata(bfd) ((struct areltdata *)((bfd)->arelt_data))
+#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
#define arch_hdr(bfd) ((struct ar_hdr *)arch_eltdata(bfd)->arch_header)
static char *get_extended_arelt_filename PARAMS ((bfd *arch,
&& tmp->arch_header[1] == ' ')
{
ardata->first_file_filepos +=
- (tmp->parsed_size + sizeof(struct ar_hdr) + 1) & ~1;
+ (tmp->parsed_size + sizeof (struct ar_hdr) + 1) & ~1;
}
bfd_release (abfd, tmp);
}