From 8af7926f455328bfc34456f6765c0cb1801e758e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 7 Jul 2020 09:27:17 +0930 Subject: 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. --- bfd/coffcode.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bfd/coffcode.h') 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: -- cgit v1.1