From 2469b3c58447e98e073ffe7ab6c9627dbbd1aa81 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Wed, 22 Nov 2017 11:20:48 -0800 Subject: Riscv ld-elf/stab failure and fake label cleanup. * as.c: Include write.h. (common_emul_init): Use FAKE_LABEL_NAME. * ecoff.c (add_file, ecoff_directive_end, ecoff_directive_loc): Likewise. (ecoff_build_symbols): Use FAKE_LABEL_CHAR. * expr.c (get_symbol_name): Use FAKE_LABEL_CHAR. Accept only if input_from_string is TRUE. * read.c (input_from_string): New. (read_symbol_name): Use FAKE_LABEL_CHAR. Accept only if input_from_string is TRUE. (temp_ilp): Set input_from_string to TRUE. (restore_ilp): Set input_from_string to FALSE. * read.h (input_from_string): Declare. * symbols.c: Include write.h (S_IS_LOCAL): Check for FAKE_LABEL_CHAR. (symbol_relc_make_sym): Fix comment refering to default fake label string. * write.h (FAKE_LABEL_CHAR): New. * config/tc-riscv.h (FAKE_LABEL_CHAR): Define. * testsuite/gas/all/err-fakelabel.s: New. --- gas/config/tc-riscv.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gas/config/tc-riscv.h') diff --git a/gas/config/tc-riscv.h b/gas/config/tc-riscv.h index d79d305..04ef467 100644 --- a/gas/config/tc-riscv.h +++ b/gas/config/tc-riscv.h @@ -39,6 +39,9 @@ struct expressionS; sure FAKE_LABEL_NAME is printable. It still must be distinct from any real label name. So, append a space, which other labels can't contain. */ #define FAKE_LABEL_NAME ".L0 " +/* Changing the special character in FAKE_LABEL_NAME requires changing + FAKE_LABEL_CHAR too. */ +#define FAKE_LABEL_CHAR ' ' #define md_relax_frag(segment, fragp, stretch) \ riscv_relax_frag (segment, fragp, stretch) -- cgit v1.1