mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
tic54x: use concat more
gas/ChangeLog: 2016-05-23 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * config/tc-tic54x.c (tic54x_sect): simplify string creation.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2016-05-23 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
|
||||||
|
|
||||||
|
* config/tc-tic54x.c (tic54x_sect): simplify string creation.
|
||||||
|
|
||||||
2016-05-23 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
|
2016-05-23 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
|
||||||
|
|
||||||
* config/tc-spu.c (APUOP): Use OPCODE as an unsigned constant.
|
* config/tc-spu.c (APUOP): Use OPCODE as an unsigned constant.
|
||||||
|
@ -1161,28 +1161,27 @@ tic54x_sect (int arg)
|
|||||||
{
|
{
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
int len;
|
int len;
|
||||||
|
/* Make sure all named initialized sections flagged properly. If we
|
||||||
|
encounter instructions, we'll flag it with SEC_CODE as well. */
|
||||||
|
const char *flags = ",\"w\"\n";
|
||||||
|
|
||||||
/* If there are quotes, remove them. */
|
/* If there are quotes, remove them. */
|
||||||
if (*input_line_pointer == '"')
|
if (*input_line_pointer == '"')
|
||||||
{
|
{
|
||||||
name = demand_copy_C_string (&len);
|
name = demand_copy_C_string (&len);
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
name = strcpy (xmalloc (len + 10), name);
|
name = concat (name, flags, (char *) NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
c = get_symbol_name (&name);
|
c = get_symbol_name (&name);
|
||||||
len = strlen(name);
|
name = concat (name, flags, (char *) NULL);
|
||||||
name = strcpy (xmalloc (len + 10), name);
|
|
||||||
(void) restore_line_pointer (c);
|
(void) restore_line_pointer (c);
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure all named initialized sections flagged properly. If we
|
|
||||||
encounter instructions, we'll flag it with SEC_CODE as well. */
|
|
||||||
strcat (name, ",\"w\"\n");
|
|
||||||
input_scrub_insert_line (name);
|
input_scrub_insert_line (name);
|
||||||
obj_coff_section (0);
|
obj_coff_section (0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user