Browse Source

binutils: use only printable chars in fake labels

Symbols named with name FAKE_LABEL_NAME get emitted when generating DWARF,
so make sure FAKE_LABEL_NAME is printable.  It still must be distinct from
any real label name, so I append a space, which other labels can't contain.
pull/19/head
Andrew Waterman 11 years ago
parent
commit
c9daf1cd5d
  1. 10
      binutils/gas/config/tc-riscv.c
  2. 2
      binutils/gas/config/tc-riscv.h

10
binutils/gas/config/tc-riscv.c

@ -819,14 +819,8 @@ normalize_constant_expr (expressionS *ex)
static symbolS *
make_internal_label (void)
{
static uint32_t count;
char name[16];
sprintf (name, ".LX%d", count);
gas_assert (++count != 0);
return (symbolS *) local_symbol_make (name, now_seg, (valueT) frag_now_fix(),
frag_now);
return (symbolS *) local_symbol_make (FAKE_LABEL_NAME, now_seg,
(valueT) frag_now_fix(), frag_now);
}
/* Load an entry from the GOT. */

2
binutils/gas/config/tc-riscv.h

@ -37,7 +37,7 @@ struct expressionS;
#define OLD_FLOAT_READS
#define REPEAT_CONS_EXPRESSIONS
#define LOCAL_LABELS_FB 1
#define FAKE_LABEL_NAME ".L0\001"
#define FAKE_LABEL_NAME ".L0 "
#define md_relax_frag(segment, fragp, stretch) \
riscv_relax_frag(segment, fragp, stretch)

Loading…
Cancel
Save