+Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
+ common symbol defined by the linker. Don't export function code
+ even if export_defineds is set.
+
+Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
+
+ * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
+ and R_JMP_DEL.
+ (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
+ (h8300_symbol_address_p): New function.
+ (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
+ relaxing.
+
Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
* coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
case bfd_archive:
/* We need to look through the archive for stripped dynamic
objects, because they will not appear in the archive map even
- though they should, perhaps, be included. */
+ though they should, perhaps, be included. Also, if the
+ linker has no map, we just consider each object file in turn,
+ since that apparently is what the AIX native linker does. */
{
bfd *member;
while (member != NULL)
{
if (bfd_check_format (member, bfd_object)
- && (member->flags & DYNAMIC) != 0
- && (member->flags & HAS_SYMS) == 0)
+ && (! bfd_has_map (abfd)
+ || ((member->flags & DYNAMIC) != 0
+ && (member->flags & HAS_SYMS) == 0)))
{
boolean needed;
member = bfd_openr_next_archived_file (abfd, member);
}
+ if (! bfd_has_map (abfd))
+ return true;
+
/* Now do the usual search. */
return (_bfd_generic_link_add_archive_symbols
(abfd, info, xcoff_link_check_archive_element));
struct xcoff_loader_info *ldinfo = (struct xcoff_loader_info *) p;
size_t len;
- /* If all defined symbols should be exported, mark them now. */
+ /* If this is a final link, and the symbol was defined as a common
+ symbol in a regular object file, and there was no definition in
+ any dynamic object, then the linker will have allocated space for
+ the symbol in a common section but the XCOFF_DEF_REGULAR flag
+ will not have been set. */
+ if (h->root.type == bfd_link_hash_defined
+ && (h->flags & XCOFF_DEF_REGULAR) == 0
+ && (h->flags & XCOFF_REF_REGULAR) != 0
+ && (h->flags & XCOFF_DEF_DYNAMIC) == 0
+ && (h->root.u.def.section->owner->flags & DYNAMIC) == 0)
+ h->flags |= XCOFF_DEF_REGULAR;
+
+ /* If all defined symbols should be exported, mark them now. We
+ don't want to export the actual functions, just the function
+ descriptors. */
if (ldinfo->export_defineds
- && (h->flags & XCOFF_DEF_REGULAR) != 0)
+ && (h->flags & XCOFF_DEF_REGULAR) != 0
+ && h->root.root.string[0] != '.')
h->flags |= XCOFF_EXPORT;
/* We don't want to garbage collect symbols which are not defined in
/* Every symbol in a shared object is defined somewhere. */
val = 0;
}
- else if (! info->relocateable
- && ! info->shared)
+ else if (! info->relocateable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,