aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>2004-02-11 01:35:14 +0000
committerJim Wilson <wilson@tuliptree.org>2004-02-11 01:35:14 +0000
commit936cf02ed4b2ba668a7a74a2dfff984c2a94be24 (patch)
treef83bb687821208d88e8e6f6fe5c6f03dc1e081fc /gas
parent3903d4379d19d936333bf889f64545a90363b31b (diff)
downloadgdb-936cf02ed4b2ba668a7a74a2dfff984c2a94be24.zip
gdb-936cf02ed4b2ba668a7a74a2dfff984c2a94be24.tar.gz
gdb-936cf02ed4b2ba668a7a74a2dfff984c2a94be24.tar.bz2
Patch from Steve Ellcey for ia64-hpux.
* config/tc-ia64.h (ia64_frob_symbol): New declaration. (tc_frob_symbol): New macro definition. * config/tc-ia64.c (ia64_frob_symbol): New routine.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-ia64.c17
-rw-r--r--gas/config/tc-ia64.h6
3 files changed, 29 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d6fbbe7..50ded93 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-10 Steve Ellcey <sje@cup.hp.com>
+
+ * config/tc-ia64.h (ia64_frob_symbol): New declaration.
+ (tc_frob_symbol): New macro definition.
+ * config/tc-ia64.c (ia64_frob_symbol): New routine.
+
2004-02-09 Daniel Jacobowitz <drow@mvista.com>
* config/tc-arm.c (md_begin): Mark .note.gnu.arm.ident as
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 450b91f..fe66ffa 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -7119,6 +7119,23 @@ ia64_frob_label (sym)
}
}
+#ifdef TE_HPUX
+/* The HP-UX linker will give unresolved symbol errors for symbols
+ that are declared but unused. This routine removes declared,
+ unused symbols from an object. */
+int
+ia64_frob_symbol (sym)
+ struct symbol *sym;
+{
+ if ((S_GET_SEGMENT (sym) == &bfd_und_section && ! symbol_used_p (sym) &&
+ ELF_ST_VISIBILITY (S_GET_OTHER (sym)) == STV_DEFAULT)
+ || (S_GET_SEGMENT (sym) == &bfd_abs_section
+ && ! S_IS_EXTERNAL (sym)))
+ return 1;
+ return 0;
+}
+#endif
+
void
ia64_flush_pending_output ()
{
diff --git a/gas/config/tc-ia64.h b/gas/config/tc-ia64.h
index 01f8219..d1a04ee 100644
--- a/gas/config/tc-ia64.h
+++ b/gas/config/tc-ia64.h
@@ -91,6 +91,9 @@ extern void ia64_end_of_source PARAMS((void));
extern void ia64_start_line PARAMS((void));
extern int ia64_unrecognized_line PARAMS((int ch));
extern void ia64_frob_label PARAMS((struct symbol *sym));
+#ifdef TE_HPUX
+extern int ia64_frob_symbol PARAMS((struct symbol *sym));
+#endif
extern void ia64_flush_pending_output PARAMS((void));
extern int ia64_parse_name (char *name, expressionS *e);
extern int ia64_optimize_expr PARAMS((expressionS *l, operatorT op,
@@ -118,6 +121,9 @@ extern void ia64_convert_frag (fragS *);
#define md_start_line_hook() ia64_start_line ()
#define tc_unrecognized_line(ch) ia64_unrecognized_line (ch)
#define tc_frob_label(s) ia64_frob_label (s)
+#ifdef TE_HPUX
+#define tc_frob_symbol(s,p) p |= ia64_frob_symbol (s)
+#endif /* TE_HPUX */
#define md_flush_pending_output() ia64_flush_pending_output ()
#define md_parse_name(s,e,c) ia64_parse_name (s, e)
#define tc_canonicalize_symbol_name(s) ia64_canonicalize_symbol_name (s)