Browse Source

* pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace

occurrences with bfd_btye * thoughout file.

	* coff-rs6000.c (do_shared_object_padding): Warning fix.
	(xcoff_write_armap_big): Likewise.
	(xcoff_write_archive_contents_old): Likewise.
	(xcoff_write_archive_contents_big): Likewise.

	* elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
jimb-rda-nptl-branch
Alan Modra 22 years ago
parent
commit
9dadfa79ec
  1. 12
      bfd/ChangeLog
  2. 10
      bfd/coff-rs6000.c
  3. 4
      bfd/elf64-mmix.c
  4. 48
      bfd/pdp11.c

12
bfd/ChangeLog

@ -1,3 +1,15 @@
2004-08-16 Alan Modra <amodra@bigpond.net.au>
* pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
occurrences with bfd_btye * thoughout file.
* coff-rs6000.c (do_shared_object_padding): Warning fix.
(xcoff_write_armap_big): Likewise.
(xcoff_write_archive_contents_old): Likewise.
(xcoff_write_archive_contents_big): Likewise.
* elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
2004-08-13 Nick Clifton <nickc@redhat.com> 2004-08-13 Nick Clifton <nickc@redhat.com>
* elf32-arm.h: Convert to ISO C90. * elf32-arm.h: Convert to ISO C90.

10
bfd/coff-rs6000.c

@ -180,7 +180,7 @@ static bfd_boolean do_pad
static bfd_boolean do_copy static bfd_boolean do_copy
PARAMS ((bfd *, bfd *)); PARAMS ((bfd *, bfd *));
static bfd_boolean do_shared_object_padding static bfd_boolean do_shared_object_padding
PARAMS ((bfd *, bfd *, ufile_ptr *, int)); PARAMS ((bfd *, bfd *, file_ptr *, int));
/* Relocation functions */ /* Relocation functions */
static bfd_boolean xcoff_reloc_type_br static bfd_boolean xcoff_reloc_type_br
@ -1742,7 +1742,7 @@ static bfd_boolean
do_shared_object_padding (out_bfd, in_bfd, offset, ar_header_size) do_shared_object_padding (out_bfd, in_bfd, offset, ar_header_size)
bfd *out_bfd; bfd *out_bfd;
bfd *in_bfd; bfd *in_bfd;
ufile_ptr *offset; file_ptr *offset;
int ar_header_size; int ar_header_size;
{ {
if (bfd_check_format (in_bfd, bfd_object) if (bfd_check_format (in_bfd, bfd_object)
@ -1779,7 +1779,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
const bfd_arch_info_type *arch_info = NULL; const bfd_arch_info_type *arch_info = NULL;
bfd *current_bfd; bfd *current_bfd;
size_t string_length; size_t string_length;
ufile_ptr nextoff, prevoff; file_ptr nextoff, prevoff;
/* First, we look through the symbols and work out which are /* First, we look through the symbols and work out which are
from 32-bit objects and which from 64-bit ones. */ from 32-bit objects and which from 64-bit ones. */
@ -2076,7 +2076,7 @@ xcoff_write_archive_contents_old (abfd)
file_ptr *offsets; file_ptr *offsets;
bfd_boolean makemap; bfd_boolean makemap;
bfd_boolean hasobjects; bfd_boolean hasobjects;
ufile_ptr prevoff, nextoff; file_ptr prevoff, nextoff;
bfd *sub; bfd *sub;
size_t i; size_t i;
struct xcoff_ar_hdr ahdr; struct xcoff_ar_hdr ahdr;
@ -2306,7 +2306,7 @@ xcoff_write_archive_contents_big (abfd)
file_ptr *offsets; file_ptr *offsets;
bfd_boolean makemap; bfd_boolean makemap;
bfd_boolean hasobjects; bfd_boolean hasobjects;
ufile_ptr prevoff, nextoff; file_ptr prevoff, nextoff;
bfd *current_bfd; bfd *current_bfd;
size_t i; size_t i;
struct xcoff_ar_hdr_big *hdr, ahdr; struct xcoff_ar_hdr_big *hdr, ahdr;

4
bfd/elf64-mmix.c

@ -229,10 +229,6 @@ static void
mmix_set_relaxable_size mmix_set_relaxable_size
PARAMS ((bfd *, asection *, void *)); PARAMS ((bfd *, asection *, void *));
static bfd_boolean
mmix_elf_get_section_contents
PARAMS ((bfd *, sec_ptr, void *, file_ptr, bfd_size_type));
/* Watch out: this currently needs to have elements with the same index as /* Watch out: this currently needs to have elements with the same index as
their R_MMIX_ number. */ their R_MMIX_ number. */

48
bfd/pdp11.c

@ -341,11 +341,6 @@ DESCRIPTION
#define RELOC_SIZE 2 #define RELOC_SIZE 2
struct pdp11_aout_reloc_external
{
bfd_byte e_reloc_entry[2];
};
#define RELFLG 0x0001 /* pc-relative flag */ #define RELFLG 0x0001 /* pc-relative flag */
#define RTYPE 0x000e /* type mask */ #define RTYPE 0x000e /* type mask */
#define RIDXMASK 0xfff0 /* index mask */ #define RIDXMASK 0xfff0 /* index mask */
@ -368,9 +363,9 @@ static void adjust_z_magic PARAMS ((bfd *, struct internal_exec *));
static void adjust_n_magic PARAMS ((bfd *, struct internal_exec *)); static void adjust_n_magic PARAMS ((bfd *, struct internal_exec *));
static int pdp11_aout_write_headers PARAMS ((bfd *, struct internal_exec *)); static int pdp11_aout_write_headers PARAMS ((bfd *, struct internal_exec *));
void pdp11_aout_swap_reloc_out PARAMS ((bfd *, arelent *, struct pdp11_aout_reloc_external *)); void pdp11_aout_swap_reloc_out PARAMS ((bfd *, arelent *, bfd_byte *));
void pdp11_aout_swap_reloc_in void pdp11_aout_swap_reloc_in
PARAMS ((bfd *, struct pdp11_aout_reloc_external *, arelent *, PARAMS ((bfd *, bfd_byte *, arelent *,
bfd_size_type, asymbol **, bfd_size_type)); bfd_size_type, asymbol **, bfd_size_type));
/* /*
@ -2032,7 +2027,7 @@ void
pdp11_aout_swap_reloc_out (abfd, g, natptr) pdp11_aout_swap_reloc_out (abfd, g, natptr)
bfd *abfd; bfd *abfd;
arelent *g; arelent *g;
register struct pdp11_aout_reloc_external *natptr; bfd_byte *natptr;
{ {
int r_index; int r_index;
int r_pcrel; int r_pcrel;
@ -2094,7 +2089,7 @@ pdp11_aout_swap_reloc_out (abfd, g, natptr)
reloc_entry = r_index << 4 | r_type | r_pcrel; reloc_entry = r_index << 4 | r_type | r_pcrel;
PUT_WORD (abfd, reloc_entry, natptr->e_reloc_entry); PUT_WORD (abfd, reloc_entry, natptr);
} }
/* BFD deals internally with all things based from the section they're /* BFD deals internally with all things based from the section they're
@ -2147,7 +2142,7 @@ void
pdp11_aout_swap_reloc_in (abfd, bytes, cache_ptr, offset, pdp11_aout_swap_reloc_in (abfd, bytes, cache_ptr, offset,
symbols, symcount) symbols, symcount)
bfd *abfd; bfd *abfd;
struct pdp11_aout_reloc_external *bytes; bfd_byte *bytes;
arelent *cache_ptr; arelent *cache_ptr;
bfd_size_type offset; bfd_size_type offset;
asymbol **symbols; asymbol **symbols;
@ -2194,7 +2189,7 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
sec_ptr asect; sec_ptr asect;
asymbol **symbols; asymbol **symbols;
{ {
struct pdp11_aout_reloc_external *rptr; bfd_byte *rptr;
bfd_size_type count; bfd_size_type count;
bfd_size_type reloc_size; bfd_size_type reloc_size;
PTR relocs; PTR relocs;
@ -2260,16 +2255,14 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
cache_ptr = reloc_cache; cache_ptr = reloc_cache;
rptr = (struct pdp11_aout_reloc_external *) relocs; rptr = relocs;
for (counter = 0; for (counter = 0;
counter < count; counter < count;
counter++, ((char *)rptr) += RELOC_SIZE, cache_ptr++) counter++, rptr += RELOC_SIZE, cache_ptr++)
{ {
while (GET_WORD (abfd, (PTR)rptr) == 0) while (GET_WORD (abfd, (PTR)rptr) == 0)
{ {
rptr = rptr += RELOC_SIZE;
(struct pdp11_aout_reloc_external *)
((char *) rptr + RELOC_SIZE);
if ((char *) rptr >= (char *) relocs + reloc_size) if ((char *) rptr >= (char *) relocs + reloc_size)
goto done; goto done;
} }
@ -2322,10 +2315,9 @@ NAME(aout,squirt_out_relocs) (abfd, section)
{ {
while (count > 0) while (count > 0)
{ {
struct pdp11_aout_reloc_external *r; bfd_byte *r;
r = (struct pdp11_aout_reloc_external *) r = native + (*generic)->address;
(native + (*generic)->address);
pdp11_aout_swap_reloc_out (abfd, *generic, r); pdp11_aout_swap_reloc_out (abfd, *generic, r);
count--; count--;
generic++; generic++;
@ -3354,7 +3346,7 @@ static bfd_boolean pdp11_aout_link_input_section
PARAMS ((struct aout_final_link_info *finfo, PARAMS ((struct aout_final_link_info *finfo,
bfd *input_bfd, bfd *input_bfd,
asection *input_section, asection *input_section,
struct pdp11_aout_reloc_external *relocs, bfd_byte *relocs,
bfd_size_type rel_size, bfd_size_type rel_size,
bfd_byte *contents)); bfd_byte *contents));
@ -4445,7 +4437,7 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
/* Relocate the section contents. */ /* Relocate the section contents. */
if (! pdp11_aout_link_input_section (finfo, input_bfd, input_section, if (! pdp11_aout_link_input_section (finfo, input_bfd, input_section,
(struct pdp11_aout_reloc_external *) relocs, (bfd_byte *) relocs,
rel_size, finfo->contents)) rel_size, finfo->contents))
return FALSE; return FALSE;
@ -4509,7 +4501,7 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
struct aout_final_link_info *finfo; struct aout_final_link_info *finfo;
bfd *input_bfd; bfd *input_bfd;
asection *input_section; asection *input_section;
struct pdp11_aout_reloc_external *relocs; bfd_byte *relocs;
bfd_size_type rel_size; bfd_size_type rel_size;
bfd_byte *contents; bfd_byte *contents;
{ {
@ -4524,8 +4516,8 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
struct aout_link_hash_entry **sym_hashes; struct aout_link_hash_entry **sym_hashes;
int *symbol_map; int *symbol_map;
bfd_size_type reloc_count; bfd_size_type reloc_count;
register struct pdp11_aout_reloc_external *rel; bfd_byte *rel;
struct pdp11_aout_reloc_external *rel_end; bfd_byte *rel_end;
output_bfd = finfo->output_bfd; output_bfd = finfo->output_bfd;
check_dynamic_reloc = aout_backend_info (output_bfd)->check_dynamic_reloc; check_dynamic_reloc = aout_backend_info (output_bfd)->check_dynamic_reloc;
@ -4542,8 +4534,8 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
reloc_count = rel_size / RELOC_SIZE; reloc_count = rel_size / RELOC_SIZE;
rel = relocs; rel = relocs;
rel_end = (struct pdp11_aout_reloc_external *)(((char *)rel) + rel_size); rel_end = rel + rel_size;
for (; rel < rel_end; ((char *)rel) += RELOC_SIZE) for (; rel < rel_end; rel += RELOC_SIZE)
{ {
bfd_vma r_addr; bfd_vma r_addr;
int r_index; int r_index;
@ -4651,10 +4643,10 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
} }
/* Write out the new r_index value. */ /* Write out the new r_index value. */
reloc_entry = GET_WORD (input_bfd, rel->e_reloc_entry); reloc_entry = GET_WORD (input_bfd, rel);
reloc_entry &= RIDXMASK; reloc_entry &= RIDXMASK;
reloc_entry |= r_index << 4; reloc_entry |= r_index << 4;
PUT_WORD (input_bfd, reloc_entry, rel->e_reloc_entry); PUT_WORD (input_bfd, reloc_entry, rel);
} }
else else
{ {

Loading…
Cancel
Save