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.
This commit is contained in:
Kazu Hirata 2000-11-20 19:05:12 +00:00
parent b57d7d21ef
commit beb0d161cd
11 changed files with 65 additions and 50 deletions

View File

@ -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> 2000-11-17 H.J. Lu <hjl@gnu.org>
* elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create

View File

@ -188,8 +188,8 @@ aix386_core_file_p (abfd)
core_regsec (abfd)->flags = SEC_HAS_CONTENTS; core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
core_reg2sec (abfd)->flags = SEC_HAS_CONTENTS; core_reg2sec (abfd)->flags = SEC_HAS_CONTENTS;
core_regsec (abfd)->_raw_size = sizeof(core->cd_regs); core_regsec (abfd)->_raw_size = sizeof (core->cd_regs);
core_reg2sec (abfd)->_raw_size = sizeof(core->cd_fpregs); core_reg2sec (abfd)->_raw_size = sizeof (core->cd_fpregs);
core_regsec (abfd)->vma = -1; core_regsec (abfd)->vma = -1;
core_reg2sec (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. */ /* If somebody calls any byte-swapping routines, shoot them. */
static void 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_GET ((PROTO(bfd_vma, (*), ( const bfd_byte *))) swap_abort )
#define NO_GETS ((PROTO(bfd_signed_vma, (*), (const bfd_byte *))) swap_abort ) #define NO_GETS ((PROTO(bfd_signed_vma, (*), (const bfd_byte *))) swap_abort )

View File

@ -336,14 +336,14 @@ aout_adobe_write_object_contents (abfd)
/* Now write out reloc info, followed by syms and strings */ /* Now write out reloc info, followed by syms and strings */
if (bfd_get_symcount (abfd) != 0) 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) != 0)
return false; return false;
if (! aout_32_write_syms (abfd)) if (! aout_32_write_syms (abfd))
return false; 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) != 0)
return false; 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) != 0)
return false; return false;
@ -451,7 +451,7 @@ aout_adobe_sizeof_headers (ignore_abfd, ignore)
bfd *ignore_abfd ATTRIBUTE_UNUSED; bfd *ignore_abfd ATTRIBUTE_UNUSED;
boolean ignore 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. */ /* Build the transfer vector for Adobe A.Out files. */

View File

@ -97,7 +97,7 @@ reloc_howto_type MY(howto_table)[] =
#define RELOC_ARM_BITS_NEG_LITTLE ((unsigned int) 0x10) #define RELOC_ARM_BITS_NEG_LITTLE ((unsigned int) 0x10)
reloc_howto_type * 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; bfd *abfd;
struct reloc_std_external *rel; struct reloc_std_external *rel;
int *r_index; 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) MY(reloc_howto) (BFD, REL, &IN, &EX, &PC)
void 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; bfd *abfd;
int r_extern; int r_extern;
int r_index; 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) \ #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 void
MY(relocatable_reloc)(howto, abfd, reloc, amount, r_addr) MY(relocatable_reloc) (howto, abfd, reloc, amount, r_addr)
reloc_howto_type *howto; reloc_howto_type *howto;
bfd *abfd; bfd *abfd;
struct reloc_std_external *reloc; 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) \ #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 static bfd_reloc_status_type
MY(fix_pcrel_26_done) (abfd, reloc_entry, symbol, data, input_section, 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 * reloc_howto_type *
MY(bfd_reloc_type_lookup)(abfd,code) MY(bfd_reloc_type_lookup) (abfd,code)
bfd *abfd; bfd *abfd;
bfd_reloc_code_real_type code; bfd_reloc_code_real_type code;
{ {

View File

@ -58,7 +58,7 @@ encap_object_p (abfd)
if (coff_magic != COFF_MAGIC) if (coff_magic != COFF_MAGIC)
return 0; /* Not an encap coff file */ 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)) (fseek ((f), HEADER_OFFSET((f)), 1))
magic = bfd_h_get_32 (abfd, magicbuf); magic = bfd_h_get_32 (abfd, magicbuf);
@ -72,7 +72,7 @@ encap_object_p (abfd)
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return 0; 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); 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); 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 /* If we have a coff header, it can give us better values for
text_start and exec_data_start. This is particularly useful text_start and exec_data_start. This is particularly useful

View File

@ -154,7 +154,7 @@ reloc_howto_type MY(howto_table)[] =
#define RELOC_STD_BITS_NS32K_TYPE_SH_LITTLE 5 #define RELOC_STD_BITS_NS32K_TYPE_SH_LITTLE 5
reloc_howto_type * 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; bfd *abfd ATTRIBUTE_UNUSED;
struct reloc_std_external *rel; struct reloc_std_external *rel;
int *r_index; 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); 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 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; bfd *abfd;
int r_extern; int r_extern;
int r_index; 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) \ #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 #define STAT_FOR_EXEC
@ -216,7 +216,7 @@ MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc)
#include <aoutx.h> #include <aoutx.h>
reloc_howto_type * reloc_howto_type *
MY(bfd_reloc_type_lookup)(abfd,code) MY(bfd_reloc_type_lookup) (abfd,code)
bfd *abfd; bfd *abfd;
bfd_reloc_code_real_type code; bfd_reloc_code_real_type code;
{ {

View File

@ -164,7 +164,7 @@ MY(object_p) (abfd)
if (!(MACHTYPE_OK (N_MACHTYPE (exec)))) return 0; if (!(MACHTYPE_OK (N_MACHTYPE (exec)))) return 0;
#endif #endif
NAME(aout,swap_exec_header_in)(abfd, &exec_bytes, &exec); NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec);
#ifdef SWAP_MAGIC #ifdef SWAP_MAGIC
/* swap_exec_header_in read in a_info with the wrong byte order */ /* swap_exec_header_in read in a_info with the wrong byte order */
@ -205,7 +205,7 @@ static boolean
MY(mkobject) (abfd) MY(mkobject) (abfd)
bfd *abfd; bfd *abfd;
{ {
if (NAME(aout,mkobject)(abfd) == false) if (NAME(aout,mkobject) (abfd) == false)
return false; return false;
#if 0 /* Sizes get set in set_sizes callback, later, after we know #if 0 /* Sizes get set in set_sizes callback, later, after we know
the architecture and machine. */ the architecture and machine. */

View File

@ -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. /* These macros will get 24-bit values from the bfd definition.
Big-endian only. */ Big-endian only. */
#define bfd_getb_24(BFD,ADDR) (bfd_get_8(BFD,ADDR) << 16) | \ #define bfd_getb_24(BFD,ADDR) \
(bfd_get_8(BFD,ADDR+1) << 8) | \ (bfd_get_8 (BFD, ADDR ) << 16) | \
(bfd_get_8(BFD,ADDR+2)) (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); \ #define bfd_putb_24(BFD,DATA,ADDR) \
bfd_put_8(BFD,(bfd_byte)((DATA >> 8) & 0xFF),ADDR+1); \ bfd_put_8 (BFD, (bfd_byte) ((DATA >> 16) & 0xFF), ADDR ); \
bfd_put_8(BFD,(bfd_byte)(DATA & 0xFF),ADDR+2) 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. /* Set parameters about this a.out file that are machine-dependent.
This routine is called from some_aout_object_p just before it returns. */ This routine is called from some_aout_object_p just before it returns. */

View File

@ -180,7 +180,7 @@ sunos_set_arch_mach (abfd, machtype)
} }
#define SET_ARCH_MACH(ABFD, EXEC) \ #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); choose_reloc_size(ABFD);
/* Determine the size of a relocation entry, based on the architecture */ /* Determine the size of a relocation entry, based on the architecture */

View File

@ -267,7 +267,7 @@ EMPTY_HOWTO (-1),
HOWTO(40, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"BASEREL", false, 0,0x00000000, false), 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 * reloc_howto_type *
NAME(aout,reloc_type_lookup) (abfd,code) NAME(aout,reloc_type_lookup) (abfd,code)
@ -435,7 +435,7 @@ FUNCTION
SYNOPSIS SYNOPSIS
const bfd_target *aout_@var{size}_some_aout_object_p const bfd_target *aout_@var{size}_some_aout_object_p
(bfd *abfd, (bfd *abfd,
const bfd_target *(*callback_to_real_object_p)()); const bfd_target *(*callback_to_real_object_p) ());
DESCRIPTION DESCRIPTION
Some a.out variant thinks that the file open in @var{abfd} 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. */ header, should cope with them in this callback as well. */
#endif /* DOCUMENTATION */ #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 /* Now that the segment addresses have been worked out, take a better
guess at whether the file is executable. If the entry point 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; unsigned int counter = 0;
aout_symbol_type *symbase; aout_symbol_type *symbase;
if (!NAME(aout,slurp_symbol_table)(abfd)) if (!NAME(aout,slurp_symbol_table) (abfd))
return -1; return -1;
for (symbase = obj_aout_symbols(abfd); counter++ < bfd_get_symcount (abfd);) for (symbase = obj_aout_symbols(abfd); counter++ < bfd_get_symcount (abfd);)
*(location++) = (asymbol *)( symbase++); *(location++) = (asymbol *) ( symbase++);
*location++ =0; *location++ =0;
return bfd_get_symcount (abfd); return bfd_get_symcount (abfd);
} }
@ -2478,7 +2478,7 @@ NAME(aout,canonicalize_reloc) (abfd, section, relptr, symbols)
return 0; return 0;
} }
if (!(tblptr || NAME(aout,slurp_reloc_table)(abfd, section, symbols))) if (!(tblptr || NAME(aout,slurp_reloc_table) (abfd, section, symbols)))
return -1; return -1;
if (section->flags & SEC_CONSTRUCTOR) { if (section->flags & SEC_CONSTRUCTOR) {
@ -2539,7 +2539,7 @@ long
NAME(aout,get_symtab_upper_bound) (abfd) NAME(aout,get_symtab_upper_bound) (abfd)
bfd *abfd; bfd *abfd;
{ {
if (!NAME(aout,slurp_symbol_table)(abfd)) if (!NAME(aout,slurp_symbol_table) (abfd))
return -1; return -1;
return (bfd_get_symcount (abfd)+1) * (sizeof (aout_symbol_type *)); 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->type = '-';
ret->stab_type = type_code; ret->stab_type = type_code;
ret->stab_other = (unsigned)(aout_symbol(symbol)->other & 0xff); ret->stab_other = (unsigned) (aout_symbol(symbol)->other & 0xff);
ret->stab_desc = (unsigned)(aout_symbol(symbol)->desc & 0xffff); ret->stab_desc = (unsigned) (aout_symbol(symbol)->desc & 0xffff);
ret->stab_name = stab_name; ret->stab_name = stab_name;
} }
} }
@ -2595,9 +2595,9 @@ NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how)
fprintf(file,"%s", symbol->name); fprintf(file,"%s", symbol->name);
break; break;
case bfd_print_symbol_more: case bfd_print_symbol_more:
fprintf(file,"%4x %2x %2x",(unsigned)(aout_symbol(symbol)->desc & 0xffff), fprintf(file,"%4x %2x %2x",(unsigned) (aout_symbol(symbol)->desc & 0xffff),
(unsigned)(aout_symbol(symbol)->other & 0xff), (unsigned) (aout_symbol(symbol)->other & 0xff),
(unsigned)(aout_symbol(symbol)->type)); (unsigned) (aout_symbol(symbol)->type));
break; break;
case bfd_print_symbol_all: case bfd_print_symbol_all:
{ {
@ -2607,9 +2607,9 @@ NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how)
fprintf(file," %-5s %04x %02x %02x", fprintf(file," %-5s %04x %02x %02x",
section_name, section_name,
(unsigned)(aout_symbol(symbol)->desc & 0xffff), (unsigned) (aout_symbol(symbol)->desc & 0xffff),
(unsigned)(aout_symbol(symbol)->other & 0xff), (unsigned) (aout_symbol(symbol)->other & 0xff),
(unsigned)(aout_symbol(symbol)->type & 0xff)); (unsigned) (aout_symbol(symbol)->type & 0xff));
if (symbol->name) if (symbol->name)
fprintf(file," %s", symbol->name); fprintf(file," %s", symbol->name);
} }
@ -2724,7 +2724,7 @@ NAME(aout,find_nearest_line)
*line_ptr = 0; *line_ptr = 0;
if (symbols != (asymbol **)NULL) { if (symbols != (asymbol **)NULL) {
for (p = symbols; *p; p++) { for (p = symbols; *p; p++) {
aout_symbol_type *q = (aout_symbol_type *)(*p); aout_symbol_type *q = (aout_symbol_type *) (*p);
next: next:
switch (q->type){ switch (q->type){
case N_TEXT: case N_TEXT:
@ -2775,7 +2775,7 @@ NAME(aout,find_nearest_line)
p++; p++;
if (*p == NULL) if (*p == NULL)
break; break;
q = (aout_symbol_type *)(*p); q = (aout_symbol_type *) (*p);
if (q->type != (int)N_SO) if (q->type != (int)N_SO)
goto next; goto next;

View File

@ -162,7 +162,7 @@ struct ar_cache {
#define ar_padchar(abfd) ((abfd)->xvec->ar_pad_char) #define ar_padchar(abfd) ((abfd)->xvec->ar_pad_char)
#define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen) #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) #define arch_hdr(bfd) ((struct ar_hdr *)arch_eltdata(bfd)->arch_header)
static char *get_extended_arelt_filename PARAMS ((bfd *arch, static char *get_extended_arelt_filename PARAMS ((bfd *arch,
@ -895,7 +895,7 @@ do_slurp_coff_armap (abfd)
&& tmp->arch_header[1] == ' ') && tmp->arch_header[1] == ' ')
{ {
ardata->first_file_filepos += 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); bfd_release (abfd, tmp);
} }