aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-08-08 21:15:32 +0000
committerIan Lance Taylor <ian@airs.com>1996-08-08 21:15:32 +0000
commitb2a05baf21ecb2c2cbe8353ea49419a37cbe9a64 (patch)
treeb1907a70f1c914fba6da48f8a94c980ca207a54b
parentfbc4ed7dedc73753fbd583159848d6322ea6738a (diff)
downloadgdb-b2a05baf21ecb2c2cbe8353ea49419a37cbe9a64.zip
gdb-b2a05baf21ecb2c2cbe8353ea49419a37cbe9a64.tar.gz
gdb-b2a05baf21ecb2c2cbe8353ea49419a37cbe9a64.tar.bz2
* xcofflink.c (xcoff_link_input_bfd): If we already called the
undefined_symbol callback for a symbol, then don't issue any more warnings about loader relocs. (_bfd_ppc_xcoff_relocate_section): Don't do any further processing after calling the undefined_symbol callback.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/xcofflink.c21
2 files changed, 25 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 16ff9cf..3a5fa59 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
+ * xcofflink.c (xcoff_link_input_bfd): If we already called the
+ undefined_symbol callback for a symbol, then don't issue any more
+ warnings about loader relocs.
+ (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
+ after calling the undefined_symbol callback.
+
* xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
(xcoff_link_add_symbols): Permit multiple definitions of a symbol
as the AIX linker seems to do.
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 8477444..3892f17 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -5185,6 +5185,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
{
struct xcoff_link_hash_entry *h = NULL;
struct internal_ldrel ldrel;
+ boolean quiet;
*rel_hash = NULL;
@@ -5310,6 +5311,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
}
}
+ quiet = false;
switch (irel->r_type)
{
default:
@@ -5361,7 +5363,17 @@ xcoff_link_input_bfd (finfo, input_bfd)
}
else
{
- if (h->ldindx < 0)
+ if (! finfo->info->relocateable
+ && (h->flags & XCOFF_DEF_DYNAMIC) == 0
+ && (h->flags & XCOFF_IMPORT) == 0)
+ {
+ /* We already called the undefined_symbol
+ callback for this relocation, in
+ _bfd_ppc_xcoff_relocate_section. Don't
+ issue any more warnings. */
+ quiet = true;
+ }
+ if (h->ldindx < 0 && ! quiet)
{
(*_bfd_error_handler)
("%s: `%s' in loader reloc but not loader sym",
@@ -5375,7 +5387,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
ldrel.l_rtype = (irel->r_size << 8) | irel->r_type;
ldrel.l_rsecnm = o->output_section->target_index;
if (xcoff_hash_table (finfo->info)->textro
- && strcmp (o->output_section->name, ".text") == 0)
+ && strcmp (o->output_section->name, ".text") == 0
+ && ! quiet)
{
(*_bfd_error_handler)
("%s: loader reloc in read-only section %s",
@@ -6152,6 +6165,10 @@ _bfd_ppc_xcoff_relocate_section (output_bfd, info, input_bfd,
(info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma)))
return false;
+
+ /* Don't try to process the reloc. It can't help, and
+ it may generate another error. */
+ continue;
}
}