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.
This commit is contained in:
Jim Wilson 2004-02-11 01:35:14 +00:00
parent 3903d4379d
commit 936cf02ed4
3 changed files with 29 additions and 0 deletions

View file

@ -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

View file

@ -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 ()
{

View file

@ -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)