aout_section_data->relocs isn't set by anything, so delete it.
(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. */
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)
(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. */