From: Jan Beulich Date: Fri, 2 May 2025 08:05:12 +0000 (+0200) Subject: Arm/COFF: accept .def outside of CCS mode X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36e66b193bf7e7b0d58538f6e0fcf1558a74b686;p=thirdparty%2Fbinutils-gdb.git Arm/COFF: accept .def outside of CCS mode There's no reason to reject this common COFF directive when it doesn't have any other meaning. --- diff --git a/binutils/testsuite/binutils-all/nm.exp b/binutils/testsuite/binutils-all/nm.exp index b81126b521b..c5715203523 100644 --- a/binutils/testsuite/binutils-all/nm.exp +++ b/binutils/testsuite/binutils-all/nm.exp @@ -163,7 +163,7 @@ if { [is_elf_format] || [istarget wasm32-*-*] || [istarget bpf-*-*]} { set nm_1_src "nm-elf-1.s" -} elseif {[is_coff_format] && ![istarget arm*-*-*]} { +} elseif {[is_coff_format]} { if {[istarget *c4x-*-*] || [istarget *c54x-*-*]} { set nm_1_src "nm-coff-sdef-1.s" } else { diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index eb5784eeb12..53e923197d3 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -569,7 +569,7 @@ obj_coff_ident (int ignore ATTRIBUTE_UNUSED) #define SKIP_WHITESPACES() while (is_whitespace (*input_line_pointer)) \ input_line_pointer++; -static void +void obj_coff_def (int what ATTRIBUTE_UNUSED) { if (def_symbol_in_progress != NULL) diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h index c083ad2b4d8..1d191ee2eee 100644 --- a/gas/config/obj-coff.h +++ b/gas/config/obj-coff.h @@ -330,7 +330,7 @@ extern void pecoff_obj_clear_weak_hook (symbolS *); #endif extern void obj_coff_section (int); extern segT obj_coff_add_segment (const char *); -extern void obj_coff_section (int); +extern void obj_coff_def (int); extern segT s_get_segment (symbolS *); #ifndef tc_coff_symbol_emit_hook extern void tc_coff_symbol_emit_hook (symbolS *); diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 822fd3dabbc..1fec43aae67 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -3434,7 +3434,11 @@ s_ccs_def (int name) if (codecomposer_syntax) s_globl (name); else +#ifdef OBJ_COFF + obj_coff_def (name); +#else as_bad (_(".def pseudo-op only available with -mccs flag.")); +#endif } /* Directives: Literal pools. */