aboutsummaryrefslogtreecommitdiff
path: root/gas/as.c
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2017-11-22 11:20:48 -0800
committerJim Wilson <jimw@sifive.com>2017-11-22 11:20:48 -0800
commit2469b3c58447e98e073ffe7ab6c9627dbbd1aa81 (patch)
tree592138d61a0971779b191a8f27ab818bce9f4e76 /gas/as.c
parent2ca23e65f562bd0efa7c483a99b49cc3d5118a58 (diff)
downloadgdb-2469b3c58447e98e073ffe7ab6c9627dbbd1aa81.zip
gdb-2469b3c58447e98e073ffe7ab6c9627dbbd1aa81.tar.gz
gdb-2469b3c58447e98e073ffe7ab6c9627dbbd1aa81.tar.bz2
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.
Diffstat (limited to 'gas/as.c')
-rw-r--r--gas/as.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gas/as.c b/gas/as.c
index 31e6280..fbf3257 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -39,6 +39,7 @@
#include "dwarf2dbg.h"
#include "dw2gencfi.h"
#include "bfdver.h"
+#include "write.h"
#ifdef HAVE_ITBL_CPU
#include "itbl-ops.h"
@@ -199,10 +200,10 @@ common_emul_init (void)
if (this_emulation->fake_label_name == 0)
{
if (this_emulation->leading_underscore)
- this_emulation->fake_label_name = "L0\001";
+ this_emulation->fake_label_name = FAKE_LABEL_NAME;
else
/* What other parameters should we test? */
- this_emulation->fake_label_name = ".L0\001";
+ this_emulation->fake_label_name = "." FAKE_LABEL_NAME;
}
}
#endif