diff options
author | Alan Modra <amodra@gmail.com> | 2024-12-16 18:08:54 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2024-12-16 19:37:40 +1030 |
commit | c32881686b0750ef441816cc8b211fbe8790f513 (patch) | |
tree | df694f662d2db50acc7c0b5a3fcb52ca6f8807a4 | |
parent | 4d3eb17eb9ab6f72f013f4f9f09fc7a69acf3963 (diff) | |
download | binutils-c32881686b0750ef441816cc8b211fbe8790f513.zip binutils-c32881686b0750ef441816cc8b211fbe8790f513.tar.gz binutils-c32881686b0750ef441816cc8b211fbe8790f513.tar.bz2 |
goodbye aout_section_data
aout_section_data->relocs isn't set by anything, so delete it.
-rw-r--r-- | bfd/aoutx.h | 17 | ||||
-rw-r--r-- | bfd/libaout.h | 15 | ||||
-rw-r--r-- | bfd/pdp11.c | 17 |
3 files changed, 10 insertions, 39 deletions
diff --git a/bfd/aoutx.h b/bfd/aoutx.h index 5f62ac6..2639655 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -4723,19 +4723,12 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, (file_ptr) 0, input_size)) return false; - /* Read in the relocs if we haven't already done it. */ - if (aout_section_data (input_section) != NULL - && aout_section_data (input_section)->relocs != NULL) - relocs = aout_section_data (input_section)->relocs; - else + relocs = flaginfo->relocs; + if (rel_size > 0) { - relocs = flaginfo->relocs; - if (rel_size > 0) - { - if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0 - || bfd_read (relocs, rel_size, input_bfd) != rel_size) - return false; - } + if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0 + || bfd_read (relocs, rel_size, input_bfd) != rel_size) + return false; } /* Relocate the section contents. */ diff --git a/bfd/libaout.h b/bfd/libaout.h index 05b5e13..abdabfa 100644 --- a/bfd/libaout.h +++ b/bfd/libaout.h @@ -449,21 +449,6 @@ struct aout_data_struct macro is only ever applied to an asymbol. */ #define aout_symbol(asymbol) ((aout_symbol_type *)(&(asymbol)->the_bfd)) -/* Information we keep for each a.out section. This is currently only - used by the a.out backend linker. */ - -struct aout_section_data_struct -{ - /* The unswapped relocation entries for this section. */ - void * relocs; -}; - -#define aout_section_data(s) \ - ((struct aout_section_data_struct *) (s)->used_by_bfd) - -#define set_aout_section_data(s,v) \ - ((s)->used_by_bfd = (void *)&(v)->relocs) - /* Prototype declarations for functions defined in aoutx.h. */ extern bool NAME (aout, squirt_out_relocs) diff --git a/bfd/pdp11.c b/bfd/pdp11.c index f65760f..8fa3a54 100644 --- a/bfd/pdp11.c +++ b/bfd/pdp11.c @@ -3655,19 +3655,12 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, (file_ptr) 0, input_size)) return false; - /* Read in the relocs if we haven't already done it. */ - if (aout_section_data (input_section) != NULL - && aout_section_data (input_section)->relocs != NULL) - relocs = aout_section_data (input_section)->relocs; - else + relocs = flaginfo->relocs; + if (rel_size > 0) { - relocs = flaginfo->relocs; - if (rel_size > 0) - { - if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0 - || bfd_read (relocs, rel_size, input_bfd) != rel_size) - return false; - } + if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0 + || bfd_read (relocs, rel_size, input_bfd) != rel_size) + return false; } /* Relocate the section contents. */ |