diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-05-09 14:20:52 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-05-09 14:20:52 +0000 |
commit | c9cd7160d84bd6219c9cbf155820a255b08f3e26 (patch) | |
tree | 07dec40b8cd87308ebf45bb67e2806e96a0a97e2 /gas/write.c | |
parent | 433817dddee6fed37aa16714f124cbb359d530ee (diff) | |
download | gdb-c9cd7160d84bd6219c9cbf155820a255b08f3e26.zip gdb-c9cd7160d84bd6219c9cbf155820a255b08f3e26.tar.gz gdb-c9cd7160d84bd6219c9cbf155820a255b08f3e26.tar.bz2 |
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.
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gas/write.c b/gas/write.c index 5e25e0b..7f4e2d5 100644 --- a/gas/write.c +++ b/gas/write.c @@ -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); |