diff options
author | Chris Demetriou <cgd@google.com> | 2004-04-24 06:12:25 +0000 |
---|---|---|
committer | Chris Demetriou <cgd@google.com> | 2004-04-24 06:12:25 +0000 |
commit | 3e27568fe9469749a169fb226ca0de9e43737a1f (patch) | |
tree | 2b7831c88796d16e14a553cdd98bc154d32eac3f /bfd/ecoff.c | |
parent | 9f7194c374baba1f251254912c80b48ab9256684 (diff) | |
download | gdb-3e27568fe9469749a169fb226ca0de9e43737a1f.zip gdb-3e27568fe9469749a169fb226ca0de9e43737a1f.tar.gz gdb-3e27568fe9469749a169fb226ca0de9e43737a1f.tar.bz2 |
[ bfd/ChangeLog ]
2004-04-23 Chris Demetriou <cgd@broadcom.com>
* coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
(mips_switch_reloc, mips_read_relocs, mips_relax_section)
(mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
(mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
and update comments to reflect current usage.
(mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
and MIPS_R_SWITCH, as well as several empty entries. Update comment
for MIPS_R_PCREL16.
(mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
(mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
(mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
type number to be MIPS_R_PCREL16.
(mips_relocate_section): Remove support for link-time relaxation
of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
MIPS_R_RELLO, and MIPS_R_RELHI relocations.
(_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
* ecoff.c (ecoff_indirect_link_order): Remove support for link-time
relaxation of branches used by embedded-PIC.
* ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
* libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
related members, update comment.
* pe-mips.c: Remove disabled (commented-out and #if 0'd)
code related to embedded-PIC.
* elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
initialization of now-removed 'adjust' member of
'struct ecoff_debug_info'.
[ include/coff/ChangeLog ]
2004-04-23 Chris Demetriou <cgd@broadcom.com>
* mips.h (MIPS_R_RELHI, MIPS_R_RELLO, MIPS_R_SWITCH): Remove
(MIPS_R_PCREL16): Update comment.
* ecoff.h (struct ecoff_value_adjust): Remove structure.
(struct ecoff_debug_info): Remove 'adjust' member.
Diffstat (limited to 'bfd/ecoff.c')
-rw-r--r-- | bfd/ecoff.c | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/bfd/ecoff.c b/bfd/ecoff.c index cfc5ae1..5991fdd 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -4526,7 +4526,6 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order) { asection *input_section; bfd *input_bfd; - struct ecoff_section_tdata *section_tdata; bfd_size_type raw_size; bfd_size_type cooked_size; bfd_byte *contents = NULL; @@ -4542,7 +4541,6 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order) input_section = link_order->u.indirect.section; input_bfd = input_section->owner; - section_tdata = ecoff_section_data (input_bfd, input_section); raw_size = input_section->_raw_size; cooked_size = input_section->_cooked_size; @@ -4560,39 +4558,24 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order) if (contents == NULL && amt != 0) goto error_return; - /* If we are relaxing, the contents may have already been read into - memory, in which case we copy them into our new buffer. We don't - simply reuse the old buffer in case cooked_size > raw_size. */ - if (section_tdata != (struct ecoff_section_tdata *) NULL - && section_tdata->contents != (bfd_byte *) NULL) - memcpy (contents, section_tdata->contents, (size_t) raw_size); - else - { - if (! bfd_get_section_contents (input_bfd, input_section, - (PTR) contents, - (file_ptr) 0, raw_size)) - goto error_return; - } + if (! bfd_get_section_contents (input_bfd, input_section, + (PTR) contents, + (file_ptr) 0, raw_size)) + goto error_return; /* Get the relocs. If we are relaxing MIPS code, they will already have been read in. Otherwise, we read them in now. */ external_reloc_size = ecoff_backend (input_bfd)->external_reloc_size; external_relocs_size = external_reloc_size * input_section->reloc_count; - if (section_tdata != (struct ecoff_section_tdata *) NULL - && section_tdata->external_relocs != NULL) - external_relocs = section_tdata->external_relocs; - else - { - external_relocs = (PTR) bfd_malloc (external_relocs_size); - if (external_relocs == NULL && external_relocs_size != 0) - goto error_return; + external_relocs = (PTR) bfd_malloc (external_relocs_size); + if (external_relocs == NULL && external_relocs_size != 0) + goto error_return; - if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0 - || (bfd_bread (external_relocs, external_relocs_size, input_bfd) - != external_relocs_size)) - goto error_return; - } + if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0 + || (bfd_bread (external_relocs, external_relocs_size, input_bfd) + != external_relocs_size)) + goto error_return; /* Relocate the section contents. */ if (! ((*ecoff_backend (input_bfd)->relocate_section) @@ -4625,14 +4608,14 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order) if (contents != NULL) free (contents); - if (external_relocs != NULL && section_tdata == NULL) + if (external_relocs != NULL) free (external_relocs); return TRUE; error_return: if (contents != NULL) free (contents); - if (external_relocs != NULL && section_tdata == NULL) + if (external_relocs != NULL) free (external_relocs); return FALSE; } |