gas:LoongArch: Fix segment error in compilation due to too long symbol name.

Change "char buffer[8192];" into "char *buffer =
  (char *) malloc(1000 +  6 * len_str);" in function
  loongarch_expand_macro_with_format_map.

  gas/
    * config/tc-loongarch.c

  include/
    * opcode/loongarch.h

  opcodes/
    * loongarch-coder.c
This commit is contained in:
liuzhensong
2022-03-20 09:18:00 +08:00
parent 748594bc07
commit 5fb13d7ef4
3 changed files with 18 additions and 9 deletions

View File

@ -163,11 +163,11 @@ dec2 : [1-9][0-9]?
const char *format, const char *macro, const char *const arg_strs[],
const char *(*map) (char esc1, char esc2, const char *arg),
char *(*helper) (const char *const arg_strs[], void *context),
void *context);
void *context, size_t len_str);
extern char *loongarch_expand_macro (
const char *macro, const char *const arg_strs[],
char *(*helper) (const char *const arg_strs[], void *context),
void *context);
void *context, size_t len_str);
extern size_t loongarch_bits_imm_needed (int64_t imm, int si);
extern void loongarch_eliminate_adjacent_repeat_char (char *dest, char c);