mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
PR gas/4460
* config/tc-i386.c (lex_got): Don't replace the reloc token with a space if we already have a space.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2007-05-04 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
PR gas/4460
|
||||||
|
* config/tc-i386.c (lex_got): Don't replace the reloc token with
|
||||||
|
a space if we already have a space.
|
||||||
|
|
||||||
2007-05-03 H.J. Lu <hongjiu.lu@intel.com>
|
2007-05-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* config/tc-i386.c (match_template): Don't explicitly check
|
* config/tc-i386.c (match_template): Don't explicitly check
|
||||||
|
@ -4477,9 +4477,6 @@ lex_got (enum bfd_reloc_code_real *reloc,
|
|||||||
if (GOT_symbol == NULL)
|
if (GOT_symbol == NULL)
|
||||||
GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
|
GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
|
||||||
|
|
||||||
/* Replace the relocation token with ' ', so that
|
|
||||||
errors like foo@GOTOFF1 will be detected. */
|
|
||||||
|
|
||||||
/* The length of the first part of our input line. */
|
/* The length of the first part of our input line. */
|
||||||
first = cp - input_line_pointer;
|
first = cp - input_line_pointer;
|
||||||
|
|
||||||
@ -4495,9 +4492,12 @@ lex_got (enum bfd_reloc_code_real *reloc,
|
|||||||
be necessary, but be safe. */
|
be necessary, but be safe. */
|
||||||
tmpbuf = xmalloc (first + second + 2);
|
tmpbuf = xmalloc (first + second + 2);
|
||||||
memcpy (tmpbuf, input_line_pointer, first);
|
memcpy (tmpbuf, input_line_pointer, first);
|
||||||
tmpbuf[first] = ' ';
|
if (second != 0 && *past_reloc != ' ')
|
||||||
memcpy (tmpbuf + first + 1, past_reloc, second);
|
/* Replace the relocation token with ' ', so that
|
||||||
tmpbuf[first + second + 1] = '\0';
|
errors like foo@GOTOFF1 will be detected. */
|
||||||
|
tmpbuf[first++] = ' ';
|
||||||
|
memcpy (tmpbuf + first, past_reloc, second);
|
||||||
|
tmpbuf[first + second] = '\0';
|
||||||
return tmpbuf;
|
return tmpbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user