From 2bd154966a85d11bddf68f47f6811216bb404105 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 16 Sep 2025 14:46:01 +0100 Subject: [PATCH] gas: Define comment_chars for non-ELF PowerPC targets --- gas/config/tc-ppc.c | 8 ++++---- gas/config/tc-ppc.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index a92a46446f0..3b2b218bcf3 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -123,6 +123,10 @@ static void ppc_weak (int); static void ppc_GNU_visibility (int); #endif +/* This string holds the chars that always start a comment. If the + pre-processor is disabled, these aren't very useful. */ +const char ppc_comment_chars[] = "#"; + #ifdef OBJ_ELF static void ppc_elf_rdata (int); static void ppc_elf_lcomm (int); @@ -134,10 +138,6 @@ static void ppc_elf_gnu_attribute (int); /* Generic assembler global variables which must be defined by all targets. */ -/* This string holds the chars that always start a comment. If the - pre-processor is disabled, these aren't very useful. */ -const char ppc_comment_chars[] = "#"; - /* Characters which start a comment at the beginning of a line. */ const char line_comment_chars[] = "#"; diff --git a/gas/config/tc-ppc.h b/gas/config/tc-ppc.h index ea520b67842..3bbeafc172c 100644 --- a/gas/config/tc-ppc.h +++ b/gas/config/tc-ppc.h @@ -216,6 +216,9 @@ extern void ppc_new_dot_label (symbolS *); extern const char ppc_symbol_chars[]; #define tc_symbol_chars ppc_symbol_chars +#define tc_comment_chars ppc_comment_chars +extern const char ppc_comment_chars[]; + #ifdef OBJ_ELF /* Support for SHT_ORDERED */ @@ -225,9 +228,6 @@ extern int ppc_section_flags (flagword, bfd_vma, int); #define md_elf_section_type(STR, LEN) ppc_section_type (STR, LEN) #define md_elf_section_flags(FLAGS, ATTR, TYPE) ppc_section_flags (FLAGS, ATTR, TYPE) -#define tc_comment_chars ppc_comment_chars -extern const char ppc_comment_chars[]; - #define md_elf_section_letter ppc_elf_section_letter extern bfd_vma ppc_elf_section_letter (int, const char **); -- 2.47.3