2008-10-07 H.J. Lu <hongjiu.lu@intel.com>
* read.c (pseudo_set): Don't allow global register symbol only if TC_GLOBAL_REGISTER_SYMBOL_OK is undefined. * symbols.c (S_SET_EXTERNAL): Likewise. * config/tc-mmix.h (TC_GLOBAL_REGISTER_SYMBOL_OK): Defined. * doc/internals.texi: Document TC_GLOBAL_REGISTER_SYMBOL_OK.
This commit is contained in:
parent
9124fe4822
commit
97c4f2d9c9
|
@ -1,3 +1,13 @@
|
||||||
|
2008-10-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* read.c (pseudo_set): Don't allow global register symbol only
|
||||||
|
if TC_GLOBAL_REGISTER_SYMBOL_OK is undefined.
|
||||||
|
* symbols.c (S_SET_EXTERNAL): Likewise.
|
||||||
|
|
||||||
|
* config/tc-mmix.h (TC_GLOBAL_REGISTER_SYMBOL_OK): Defined.
|
||||||
|
|
||||||
|
* doc/internals.texi: Document TC_GLOBAL_REGISTER_SYMBOL_OK.
|
||||||
|
|
||||||
2008-10-06 Bob Wilson <bob.wilson@acm.org>
|
2008-10-06 Bob Wilson <bob.wilson@acm.org>
|
||||||
|
|
||||||
* doc/as.texinfo (Local): New description of ELF .local directive.
|
* doc/as.texinfo (Local): New description of ELF .local directive.
|
||||||
|
|
|
@ -224,3 +224,6 @@ extern void mmix_md_do_align (int, char *, int, int);
|
||||||
|
|
||||||
/* This target is buggy, and sets fix size too large. */
|
/* This target is buggy, and sets fix size too large. */
|
||||||
#define TC_FX_SIZE_SLACK(FIX) 6
|
#define TC_FX_SIZE_SLACK(FIX) 6
|
||||||
|
|
||||||
|
/* MMIX has global register symbols. */
|
||||||
|
#define TC_GLOBAL_REGISTER_SYMBOL_OK
|
||||||
|
|
|
@ -1325,6 +1325,11 @@ This macro is evaluated for any fixup with a @code{fx_subsy} that
|
||||||
@code{fixup_segment} cannot reduce to a number. If the macro returns
|
@code{fixup_segment} cannot reduce to a number. If the macro returns
|
||||||
@code{false} an error will be reported.
|
@code{false} an error will be reported.
|
||||||
|
|
||||||
|
@item TC_GLOBAL_REGISTER_SYMBOL_OK
|
||||||
|
@cindex TC_GLOBAL_REGISTER_SYMBOL_OK
|
||||||
|
Define this macro if global register symbols are supported. The default
|
||||||
|
is to disallow global register symbols.
|
||||||
|
|
||||||
@item MD_APPLY_SYM_VALUE (@var{fix})
|
@item MD_APPLY_SYM_VALUE (@var{fix})
|
||||||
@cindex MD_APPLY_SYM_VALUE
|
@cindex MD_APPLY_SYM_VALUE
|
||||||
This macro controls whether the symbol value becomes part of the value passed
|
This macro controls whether the symbol value becomes part of the value passed
|
||||||
|
|
|
@ -3621,12 +3621,14 @@ pseudo_set (symbolS *symbolP)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case O_register:
|
case O_register:
|
||||||
|
#ifndef TC_GLOBAL_REGISTER_SYMBOL_OK
|
||||||
if (S_IS_EXTERNAL (symbolP))
|
if (S_IS_EXTERNAL (symbolP))
|
||||||
{
|
{
|
||||||
as_bad ("can't equate global symbol `%s' with register name",
|
as_bad ("can't equate global symbol `%s' with register name",
|
||||||
S_GET_NAME (symbolP));
|
S_GET_NAME (symbolP));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
S_SET_SEGMENT (symbolP, reg_section);
|
S_SET_SEGMENT (symbolP, reg_section);
|
||||||
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
|
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
|
||||||
set_zero_frag (symbolP);
|
set_zero_frag (symbolP);
|
||||||
|
|
|
@ -2191,12 +2191,14 @@ S_SET_EXTERNAL (symbolS *s)
|
||||||
_("section symbols are already global"));
|
_("section symbols are already global"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifndef TC_GLOBAL_REGISTER_SYMBOL_OK
|
||||||
if (S_GET_SEGMENT (s) == reg_section)
|
if (S_GET_SEGMENT (s) == reg_section)
|
||||||
{
|
{
|
||||||
as_bad ("can't make register symbol `%s' global",
|
as_bad ("can't make register symbol `%s' global",
|
||||||
S_GET_NAME (s));
|
S_GET_NAME (s));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
s->bsym->flags |= BSF_GLOBAL;
|
s->bsym->flags |= BSF_GLOBAL;
|
||||||
s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
|
s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue