diff options
author | Kazu Hirata <kazu@codesourcery.com> | 2000-11-20 19:05:12 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@codesourcery.com> | 2000-11-20 19:05:12 +0000 |
commit | beb0d161cdeb8dddb7c49929ce8f415b45235759 (patch) | |
tree | cf4a82a61e745679ca32ffbf2dbd27736213f674 | |
parent | b57d7d21ef3c86b335d93b8942bb1ee50c2c9a9e (diff) | |
download | fsf-binutils-gdb-beb0d161cdeb8dddb7c49929ce8f415b45235759.zip fsf-binutils-gdb-beb0d161cdeb8dddb7c49929ce8f415b45235759.tar.gz fsf-binutils-gdb-beb0d161cdeb8dddb7c49929ce8f415b45235759.tar.bz2 |
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.
-rw-r--r-- | bfd/ChangeLog | 13 | ||||
-rw-r--r-- | bfd/aix386-core.c | 8 | ||||
-rw-r--r-- | bfd/aout-adobe.c | 8 | ||||
-rw-r--r-- | bfd/aout-arm.c | 12 | ||||
-rw-r--r-- | bfd/aout-encap.c | 6 | ||||
-rw-r--r-- | bfd/aout-ns32k.c | 10 | ||||
-rw-r--r-- | bfd/aout-target.h | 4 | ||||
-rw-r--r-- | bfd/aout-tic30.c | 16 | ||||
-rw-r--r-- | bfd/aoutf1.h | 2 | ||||
-rw-r--r-- | bfd/aoutx.h | 34 | ||||
-rw-r--r-- | bfd/archive.c | 4 |
11 files changed, 66 insertions, 51 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5a8cc83..c5e8943 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,16 @@ +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 diff --git a/bfd/aix386-core.c b/bfd/aix386-core.c index 6dc5cef..2b97117 100644 --- a/bfd/aix386-core.c +++ b/bfd/aix386-core.c @@ -188,8 +188,8 @@ aix386_core_file_p (abfd) 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; @@ -233,9 +233,9 @@ aix386_core_file_matches_executable_p (core_bfd, exec_bfd) /* 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 ) diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c index 676dca8..c79794f 100644 --- a/bfd/aout-adobe.c +++ b/bfd/aout-adobe.c @@ -336,14 +336,14 @@ aout_adobe_write_object_contents (abfd) /* 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; @@ -354,7 +354,7 @@ aout_adobe_write_object_contents (abfd) } } - 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; @@ -451,7 +451,7 @@ aout_adobe_sizeof_headers (ignore_abfd, ignore) 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. */ diff --git a/bfd/aout-arm.c b/bfd/aout-arm.c index 53fb928..182c1c6 100644 --- a/bfd/aout-arm.c +++ b/bfd/aout-arm.c @@ -97,7 +97,7 @@ reloc_howto_type MY(howto_table)[] = #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; @@ -143,7 +143,7 @@ MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel) 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; @@ -189,10 +189,10 @@ MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc) } #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; @@ -224,7 +224,7 @@ MY(relocatable_reloc)(howto, abfd, reloc, amount, r_addr) } #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, @@ -301,7 +301,7 @@ MY(fix_pcrel_26) (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; { diff --git a/bfd/aout-encap.c b/bfd/aout-encap.c index d6650a9..5f8a511 100644 --- a/bfd/aout-encap.c +++ b/bfd/aout-encap.c @@ -58,7 +58,7 @@ encap_object_p (abfd) 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); @@ -72,7 +72,7 @@ encap_object_p (abfd) 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); } @@ -84,7 +84,7 @@ encap_real_callback (abfd) { 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 diff --git a/bfd/aout-ns32k.c b/bfd/aout-ns32k.c index a0b7d70..e094a8c 100644 --- a/bfd/aout-ns32k.c +++ b/bfd/aout-ns32k.c @@ -154,7 +154,7 @@ reloc_howto_type MY(howto_table)[] = #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; @@ -176,10 +176,10 @@ MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel) 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; @@ -206,7 +206,7 @@ MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc) } #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 @@ -216,7 +216,7 @@ MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc) #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; { diff --git a/bfd/aout-target.h b/bfd/aout-target.h index 8ace897..1902cdf 100644 --- a/bfd/aout-target.h +++ b/bfd/aout-target.h @@ -164,7 +164,7 @@ MY(object_p) (abfd) 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 */ @@ -205,7 +205,7 @@ static boolean 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. */ diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c index c1f7c39..f0f4d3d 100644 --- a/bfd/aout-tic30.c +++ b/bfd/aout-tic30.c @@ -296,13 +296,15 @@ tic30_aout_fix_pcrel_16 (abfd, reloc_entry, symbol, data, input_section, /* 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. */ diff --git a/bfd/aoutf1.h b/bfd/aoutf1.h index 3e611e8..4ad49a1 100644 --- a/bfd/aoutf1.h +++ b/bfd/aoutf1.h @@ -180,7 +180,7 @@ sunos_set_arch_mach (abfd, machtype) } #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 */ diff --git a/bfd/aoutx.h b/bfd/aoutx.h index a42bf6c..d21cc57 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -267,7 +267,7 @@ EMPTY_HOWTO (-1), 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) @@ -435,7 +435,7 @@ FUNCTION 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} @@ -600,7 +600,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p) 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 @@ -1982,11 +1982,11 @@ NAME(aout,get_symtab) (abfd, location) 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); } @@ -2478,7 +2478,7 @@ NAME(aout,canonicalize_reloc) (abfd, section, relptr, symbols) 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) { @@ -2539,7 +2539,7 @@ long 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 *)); @@ -2574,8 +2574,8 @@ NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret) } 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; } } @@ -2595,9 +2595,9 @@ NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how) 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: { @@ -2607,9 +2607,9 @@ NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how) 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); } @@ -2724,7 +2724,7 @@ NAME(aout,find_nearest_line) *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: @@ -2775,7 +2775,7 @@ NAME(aout,find_nearest_line) p++; if (*p == NULL) break; - q = (aout_symbol_type *)(*p); + q = (aout_symbol_type *) (*p); if (q->type != (int)N_SO) goto next; diff --git a/bfd/archive.c b/bfd/archive.c index c1a6f81..1321073 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -162,7 +162,7 @@ struct ar_cache { #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, @@ -895,7 +895,7 @@ do_slurp_coff_armap (abfd) && 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); } |