aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-07-07 09:27:17 +0930
committerAlan Modra <amodra@gmail.com>2020-07-07 18:26:33 +0930
commit8af7926f455328bfc34456f6765c0cb1801e758e (patch)
treeced75399a6fc61d514b13ce8eed8bd6063e065a7 /bfd
parent3bde5ad1a60ef773aa11bb4618a58ec7fd3172c1 (diff)
downloadgdb-8af7926f455328bfc34456f6765c0cb1801e758e.zip
gdb-8af7926f455328bfc34456f6765c0cb1801e758e.tar.gz
gdb-8af7926f455328bfc34456f6765c0cb1801e758e.tar.bz2
XCOFF C_HIDEXT and C_AIX_WEAKEXT classification
If C_HIDEXT and C_AIX_WEAKEXT symbols aren't handled as globals by coff_classify_symbol then we run into "warning: .. local symbol `some garbage name' has no section". These are of course both global symbols, but C_HIDEXT is like a local in some respects and returning COFF_SYMBOL_LOCAL for C_HIDEXT keeps nm output looking the same. Fixes these fails on rs6000-aix5.1: -FAIL: weakref tests, relocations -FAIL: weakref tests, global syms -FAIL: weakref tests, strong undefined syms -FAIL: weakref tests, weak undefined syms * coffcode.h (coff_classify_symbol): Handle C_HIDEXT and C_AIX_WEAKEXT.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/coffcode.h10
2 files changed, 15 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 02413eb..057bc05 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2020-07-07 Alan Modra <amodra@gmail.com>
+
+ * coffcode.h (coff_classify_symbol): Handle C_HIDEXT and
+ C_AIX_WEAKEXT.
+
2020-07-06 Nick Clifton <nickc@redhat.com>
* po/pt.po: Updated Portuguese translation.
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 9a97ba7..0910f91 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -4904,6 +4904,12 @@ coff_classify_symbol (bfd *abfd,
case C_THUMBEXT:
case C_THUMBEXTFUNC:
#endif
+#ifdef RS6000COFF_C
+ case C_HIDEXT:
+#if ! defined _AIX52 && ! defined AIX_WEAK_SUPPORT
+ case C_AIX_WEAKEXT:
+#endif
+#endif
#ifdef C_SYSTEM
case C_SYSTEM:
#endif
@@ -4917,6 +4923,10 @@ coff_classify_symbol (bfd *abfd,
else
return COFF_SYMBOL_COMMON;
}
+#ifdef RS6000COFF_C
+ if (syment->n_sclass == C_HIDEXT)
+ return COFF_SYMBOL_LOCAL;
+#endif
return COFF_SYMBOL_GLOBAL;
default: