From: Steve Chamberlain Date: Wed, 27 Mar 1991 02:29:23 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c660714fb17fec0da5889664caa1c5c32746959b;p=binutils-gdb.git *** empty log message *** --- diff --git a/ld/ldlang.c b/ld/ldlang.c index d6bfe286fcf..173d1818bb3 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -19,7 +19,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id$ * * $Log$ - * Revision 1.3 1991/03/27 00:52:49 steve + * Revision 1.4 1991/03/27 02:29:22 steve + * *** empty log message *** + * + * Revision 1.3 1991/03/27 00:52:49 steve * *** empty log message *** * * Revision 1.2 1991/03/22 23:02:34 steve @@ -2170,7 +2173,7 @@ lang_abs_symbol_at_beginning_of(section, name) char *section; char *name; { - if (ldsym_get_soft(name) == (asymbol *)NULL) { + if (ldsym_undefined(name)) { extern bfd *output_bfd; extern asymbol *create_symbol(); asection *s = bfd_get_section_by_name(output_bfd, section); @@ -2198,7 +2201,7 @@ lang_abs_symbol_at_end_of(section, name) char *section; char *name; { - if (ldsym_get_soft(name) == (asymbol *)NULL) { + if (ldsym_undefined(name)){ extern bfd *output_bfd; extern asymbol *create_symbol(); asection *s = bfd_get_section_by_name(output_bfd, section); diff --git a/ld/ldsym.c b/ld/ldsym.c index 24272a926c5..986259f5769 100644 --- a/ld/ldsym.c +++ b/ld/ldsym.c @@ -20,8 +20,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ * $Id$ * * $Log$ - * Revision 1.2 1991/03/22 23:02:38 steve - * Brought up to sync with Intel again. + * Revision 1.3 1991/03/27 02:29:21 steve + * *** empty log message *** + * + * Revision 1.2 1991/03/22 23:02:38 steve + * Brought up to sync with Intel again. * * Revision 1.1 1991/03/13 00:48:32 chrisb * Initial revision @@ -450,3 +453,18 @@ ldsym_write() bfd_set_symtab(output_bfd, symbol_table, (unsigned)( tablep - symbol_table)); } } + +/* +return true if the supplied symbol name is not in the +linker symbol table +*/ +boolean +ldsym_undefined(sym) +char *sym; +{ + ldsym_type *from_table = ldsym_get_soft(sym); + if (from_table != (ldsym_type *)NULL) { + if (from_table->sdefs_chain != (asymbol **)NULL) return false; + } + return true; +} diff --git a/ld/ldsym.h b/ld/ldsym.h index 8a12bbc4d49..67daed7c797 100644 --- a/ld/ldsym.h +++ b/ld/ldsym.h @@ -51,9 +51,10 @@ PROTO(ldsym_type *, ldsym_get, (char *)); PROTO(ldsym_type *, ldsym_get_soft, (char *)); PROTO(void, ldsym_print_symbol_table,(void)); PROTO(void, ldsym_write, (void)); - +PROTO(boolean, ldsym_undefined, (char *)); #define FOR_EACH_LDSYM(x) \ extern ldsym_type *symbol_head; \ ldsym_type *x; \ for (x = symbol_head; x != (ldsym_type *)NULL; x = x->next) +