aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorSteve Chamberlain <steve@cygnus>1991-03-27 02:29:23 +0000
committerSteve Chamberlain <steve@cygnus>1991-03-27 02:29:23 +0000
commitc660714fb17fec0da5889664caa1c5c32746959b (patch)
tree70c363b607efb2b85a5e4482c33963d05e07e110 /ld
parentcb9d20492abeaa7623783227d9c522fb9a2a9255 (diff)
downloadgdb-c660714fb17fec0da5889664caa1c5c32746959b.zip
gdb-c660714fb17fec0da5889664caa1c5c32746959b.tar.gz
gdb-c660714fb17fec0da5889664caa1c5c32746959b.tar.bz2
*** empty log message ***
Diffstat (limited to 'ld')
-rw-r--r--ld/ldlang.c9
-rw-r--r--ld/ldsym.c22
-rw-r--r--ld/ldsym.h3
3 files changed, 28 insertions, 6 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index d6bfe28..173d181 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 24272a9..986259f 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 8a12bbc..67daed7 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)
+