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.
This commit is contained in:
Jan Beulich
2025-05-02 10:05:12 +02:00
parent 37d1afde86
commit 36e66b193b
4 changed files with 7 additions and 3 deletions

View File

@@ -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 {

View File

@@ -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)

View File

@@ -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 *);

View File

@@ -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. */