Commit c9cd7160 authored by H.J. Lu's avatar H.J. Lu

2005-05-09 H.J. Lu <hongjiu.lu@intel.com>

	PR 936
	* config/tc-sh64.c (sh64_fake_label): New.

	* config/tc-sh64.h (TC_FAKE_LABEL): New.

	* doc/internals.texi (TC_FAKE_LABEL): Document.

	* write.c (TC_FAKE_LABEL): New.
	(adjust_reloc_syms): Use it.
	(write_object_file): Likewise.
parent 433817dd
2005-05-09 H.J. Lu <hongjiu.lu@intel.com>
PR 936
* config/tc-sh64.c (sh64_fake_label): New.
* config/tc-sh64.h (TC_FAKE_LABEL): New.
* doc/internals.texi (TC_FAKE_LABEL): Document.
* write.c (TC_FAKE_LABEL): New.
(adjust_reloc_syms): Use it.
(write_object_file): Likewise.
2005-05-09 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (parse_insn): Disallow use of prefix separator
......
......@@ -3513,3 +3513,18 @@ sh64_vtable_inherit (int ignore ATTRIBUTE_UNUSED)
input_line_pointer = eol;
}
int
sh64_fake_label (const char *name)
{
size_t len;
if (strcmp (name, FAKE_LABEL_NAME) == 0)
return 1;
len = strlen (name);
if (len >= (sizeof (DATALABEL_SUFFIX) - 1))
return strcmp (&name [len - sizeof (DATALABEL_SUFFIX) + 1],
DATALABEL_SUFFIX) == 0;
return 0;
}
......@@ -221,3 +221,6 @@ void shmedia_md_end (void);
we have to say we only have minimum byte-size insns. */
#undef DWARF2_LINE_MIN_INSN_LENGTH
#define DWARF2_LINE_MIN_INSN_LENGTH 1
#define TC_FAKE_LABEL(NAME) sh64_fake_label(NAME)
extern int sh64_fake_label (const char *);
......@@ -1019,6 +1019,11 @@ default definition is to accept any name followed by a colon character.
Same as TC_START_LABEL, but should be used instead of TC_START_LABEL when
LABELS_WITHOUT_COLONS is defined.
@item TC_FAKE_LABEL
@cindex TC_FAKE_LABEL
You may define this macro to control what GAS considers to be a fake
label. The default fake label is FAKE_LABEL_NAME.
@item NO_PSEUDO_DOT
@cindex NO_PSEUDO_DOT
If you define this macro, GAS will not require pseudo-ops to start with a
......
......@@ -97,6 +97,10 @@
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from (FIX)
#endif
#ifndef TC_FAKE_LABEL
#define TC_FAKE_LABEL(NAME) (strcmp ((NAME), FAKE_LABEL_NAME) == 0)
#endif
/* Used to control final evaluation of expressions. */
int finalize_syms = 0;
......@@ -795,7 +799,7 @@ adjust_reloc_syms (bfd *abfd ATTRIBUTE_UNUSED,
= symbol_get_value_expression (sym)->X_add_symbol;
const char *name = S_GET_NAME (sym);
if (!S_IS_COMMON (new_sym)
&& strcmp (name, FAKE_LABEL_NAME)
&& !TC_FAKE_LABEL (name)
&& (!S_IS_EXTERNAL (sym) || S_IS_LOCAL (sym)))
as_bad (_("Local symbol `%s' can't be equated to undefined symbol `%s'"),
name, S_GET_NAME (new_sym));
......@@ -1928,7 +1932,7 @@ write_object_file (void)
{
const char *name = S_GET_NAME (symp);
if (S_IS_COMMON (symp)
&& strcmp (name, FAKE_LABEL_NAME)
&& !TC_FAKE_LABEL (name)
&& (!S_IS_EXTERNAL (symp) || S_IS_LOCAL (symp)))
{
expressionS *e = symbol_get_value_expression (symp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment