Fri Jun 10 13:25:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+ * aoutx.h (NAME(aout,canonicalize_reloc)): Handle .bss section.
+ (NAME(aout,get_reloc_upper_bound)): Likewise.
+
* coff-i960.c (coff_i960_reloc_type_lookup): Add BFD_RELOC_CTOR.
* linker.c (_bfd_generic_link_write_global_symbol): Don't assume
the section of a common symbol is not NULL.
obj_aout_external_sym_count (abfd) = count;
}
- if (obj_aout_external_strings (abfd) == NULL)
+ if (obj_aout_external_strings (abfd) == NULL
+ && exec_hdr (abfd)->a_syms != 0)
{
unsigned char string_chars[BYTES_IN_WORD];
bfd_size_type stringsize;
arelent *tblptr = section->relocation;
unsigned int count;
+ if (section == obj_bsssec (abfd))
+ {
+ *relptr = NULL;
+ return 0;
+ }
+
if (!(tblptr || NAME(aout,slurp_reloc_table)(abfd, section, symbols)))
return -1;
* ((exec_hdr(abfd)->a_trsize / obj_reloc_entry_size (abfd))
+ 1));
+ if (asect == obj_bsssec (abfd))
+ return sizeof (arelent *);
+
bfd_set_error (bfd_error_invalid_operation);
return -1;
}
{
asection *sec;
- sec = h->root.u.def.section;
+ sec = h->root.u.def.section->output_section;
BFD_ASSERT (sec == &bfd_abs_section
|| sec->owner == output_bfd);
if (sec == obj_textsec (output_bfd))
else
type = N_ABS | N_EXT;
val = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
+ + sec->vma
+ + h->root.u.def.section->output_offset);
}
break;
case bfd_link_hash_common: