From a894d76ab1afb0e16116eb16eef3f5621d62e6ab Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sun, 24 Feb 2019 18:01:08 +1030 Subject: [PATCH] Re: PowerPC __tls_get_addr arg parsing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes non-ELF powerpc build failure: tc-ppc.c:3009:1: error: ‘parse_tls_arg’ defined but not used * config/tc-ppc.c (parse_tls_arg): Wrap in #ifdef OBJ_ELF. --- gas/ChangeLog | 4 ++++ gas/config/tc-ppc.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index 03c9b4e9aec..ac18471f13b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2019-02-24 Alan Modra + + * config/tc-ppc.c (parse_tls_arg): Wrap in #ifdef OBJ_ELF. + 2019-02-24 Alan Modra PR 24144 diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 35d85a4520c..c71fe94294c 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -2999,6 +2999,7 @@ fixup_size (bfd_reloc_code_real_type reloc, bfd_boolean *pc_relative) return size; } +#ifdef OBJ_ELF /* If we have parsed a call to __tls_get_addr, parse an argument like (gd0@tlsgd). *STR is the leading parenthesis on entry. If an arg is successfully parsed, *STR is updated past the trailing @@ -3035,6 +3036,7 @@ parse_tls_arg (char **str, const expressionS *exp, struct ppc_fixup *tls_fix) } return tls_fix->reloc != BFD_RELOC_NONE; } +#endif /* This routine is called for each instruction to be assembled. */ -- 2.30.2