mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 13:27:26 +08:00
config/tc-sparc.c (s_common): Revamp to handle both syntaxes, and not be
target-specific.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Thu Jul 8 14:15:05 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
|
||||||
|
|
||||||
|
* config/tc-sparc.c (s_common): Revamp to handle both syntaxes,
|
||||||
|
and not be target-specific.
|
||||||
|
|
||||||
Thu Jul 8 07:25:25 1993 Doug Evans (dje@canuck.cygnus.com)
|
Thu Jul 8 07:25:25 1993 Doug Evans (dje@canuck.cygnus.com)
|
||||||
|
|
||||||
* config/tc-h8300.h (TC_CONS_RELOC): Use R_RELLONG if h8/300h.
|
* config/tc-h8300.h (TC_CONS_RELOC): Use R_RELLONG if h8/300h.
|
||||||
|
@ -387,7 +387,6 @@ s_common ()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
know (symbolP->sy_frag == &zero_address_frag);
|
know (symbolP->sy_frag == &zero_address_frag);
|
||||||
#ifdef OBJ_ELF
|
|
||||||
if (*input_line_pointer != ',')
|
if (*input_line_pointer != ',')
|
||||||
{
|
{
|
||||||
as_bad ("Expected comma after common length");
|
as_bad ("Expected comma after common length");
|
||||||
@ -411,11 +410,15 @@ s_common ()
|
|||||||
}
|
}
|
||||||
if (symbolP->local)
|
if (symbolP->local)
|
||||||
{
|
{
|
||||||
segT old_sec = now_seg;
|
segT old_sec;
|
||||||
int old_subsec = now_subseg;
|
int old_subsec;
|
||||||
char *p;
|
char *p;
|
||||||
int align = temp;
|
int align;
|
||||||
|
|
||||||
|
allocate_bss:
|
||||||
|
old_sec = now_seg;
|
||||||
|
old_subsec = now_subseg;
|
||||||
|
align = temp;
|
||||||
record_alignment (bss_section, align);
|
record_alignment (bss_section, align);
|
||||||
subseg_set (bss_section, 0);
|
subseg_set (bss_section, 0);
|
||||||
if (align)
|
if (align)
|
||||||
@ -432,6 +435,7 @@ s_common ()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
allocate_common:
|
||||||
S_SET_VALUE (symbolP, size);
|
S_SET_VALUE (symbolP, size);
|
||||||
S_SET_EXTERNAL (symbolP);
|
S_SET_EXTERNAL (symbolP);
|
||||||
/* should be common, but this is how gas does it for now */
|
/* should be common, but this is how gas does it for now */
|
||||||
@ -441,20 +445,25 @@ s_common ()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
input_line_pointer++;
|
input_line_pointer++;
|
||||||
|
/* @@ Some use the dot, some don't. Can we get some consistency?? */
|
||||||
|
if (*input_line_pointer == '.')
|
||||||
|
input_line_pointer++;
|
||||||
|
/* @@ Some say data, some say bss. */
|
||||||
if (strncmp (input_line_pointer, "bss\"", 4)
|
if (strncmp (input_line_pointer, "bss\"", 4)
|
||||||
&& strncmp (input_line_pointer, ".bss\"", 5))
|
&& strncmp (input_line_pointer, "data\"", 5))
|
||||||
{
|
{
|
||||||
input_line_pointer -= 2;
|
while (*--input_line_pointer != '"')
|
||||||
|
;
|
||||||
|
input_line_pointer--;
|
||||||
goto bad_common_segment;
|
goto bad_common_segment;
|
||||||
}
|
}
|
||||||
while (*input_line_pointer++ != '"')
|
while (*input_line_pointer++ != '"')
|
||||||
;
|
;
|
||||||
|
goto allocate_common;
|
||||||
|
}
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (strncmp (input_line_pointer, ",\"bss\"", 6) != 0
|
|
||||||
&& strncmp (input_line_pointer, ",\"data\"", 7) != 0)
|
|
||||||
{
|
{
|
||||||
bad_common_segment:
|
bad_common_segment:
|
||||||
p = input_line_pointer;
|
p = input_line_pointer;
|
||||||
@ -464,12 +473,11 @@ s_common ()
|
|||||||
*p = '\0';
|
*p = '\0';
|
||||||
as_bad ("bad .common segment %s", input_line_pointer + 1);
|
as_bad ("bad .common segment %s", input_line_pointer + 1);
|
||||||
*p = c;
|
*p = c;
|
||||||
|
input_line_pointer = p;
|
||||||
|
ignore_rest_of_line ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
input_line_pointer += 6 + (input_line_pointer[2] == 'd'); /* Skip either */
|
}
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
return;
|
|
||||||
} /* s_common() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
s_seg ()
|
s_seg ()
|
||||||
|
Reference in New Issue
Block a user