* aoutx.h (NAME(aout,final_link)): Check flavour of sub, not abfd,

when computing reloc sizes.  From Eric Youngdale
	<ericy@cais.cais.com>.
	* elfcode.h (elf_bfd_final_link): Don't try to compute maximum
	reloc count or size for a non-ELF file.
This commit is contained in:
Ian Lance Taylor 1994-06-20 15:51:28 +00:00
parent aa91350c62
commit 6c8fa8e62c
3 changed files with 16 additions and 10 deletions

View File

@ -1,5 +1,11 @@
Mon Jun 20 11:06:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
* aoutx.h (NAME(aout,final_link)): Check flavour of sub, not abfd,
when computing reloc sizes. From Eric Youngdale
<ericy@cais.cais.com>.
* elfcode.h (elf_bfd_final_link): Don't try to compute maximum
reloc count or size for a non-ELF file.
* mipsbsd.c (MY_final_link_callback): Define to avoid warning.
* hp300hpux.c (MY_final_link_callback): Define to avoid warning.

View File

@ -3291,7 +3291,7 @@ NAME(aout,final_link) (abfd, info, callback)
drsize = 0;
for (sub = info->input_bfds; sub != (bfd *) NULL; sub = sub->link_next)
{
if (bfd_get_flavour (abfd) == bfd_target_aout_flavour)
if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
{
trsize += exec_hdr (sub)->a_trsize;
drsize += exec_hdr (sub)->a_drsize;

View File

@ -5115,7 +5115,6 @@ elf_bfd_final_link (abfd, info)
if (sym_count > max_sym_count)
max_sym_count = sym_count;
}
if ((sec->flags & SEC_RELOC) != 0)
{
@ -5129,6 +5128,7 @@ elf_bfd_final_link (abfd, info)
}
}
}
}
if (o->reloc_count > 0)
o->flags |= SEC_RELOC;