]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
*** empty log message ***
authorSteve Chamberlain <steve@cygnus>
Wed, 27 Mar 1991 00:53:16 +0000 (00:53 +0000)
committerSteve Chamberlain <steve@cygnus>
Wed, 27 Mar 1991 00:53:16 +0000 (00:53 +0000)
ld/Makefile
ld/ldlang.c

index 014b17fc4fd5165a28390038b77a75721e834267..d5ef19f000fb1d7862bb53016f2b1a84ed55439f 100755 (executable)
@@ -32,7 +32,7 @@ MANSOURCES=ld.tex
 LDCSOURCES=ldlang.c ldmain.c ldwrite.c ld-lnk960.c ld-gld.c \
        ld-gld960.c ld-emul.c ldversion.c ldmisc.c ldexp.c ldsym.c ldfile.c
 
-GENERATED_SOURCES=ldgram.tab.c ldlex.c
+GENERATED_SOURCES=ldgram.tab.c ldlex.c ldgram.tab.h y.tab.h
 GENERATED_HEADERS=ldgram.tab.h
 
 LDSOURCES=$(LDCSOURCES) ldgram.y ldlex.l
@@ -94,6 +94,7 @@ clean:
        - rm -f $(OBJS) $(GENERATED_SOURCES) $(GENERATED_HEADERS)
        - rm -f ld ld1 ld2
 
+
 lintlog:$(SOURCES) Makefile
        $(LINT) -abhxzn  $(CFLAGS)  $(LINTSOURCES) \
 | grep -v "pointer casts may be troublesome" \
index 0df171f3e031b98a841e7c533008058e2fb83fc7..d6bfe286fcfdc89e59fbee619a63e4a934d0133b 100644 (file)
@@ -19,7 +19,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* $Id$ 
  *
  * $Log$
- * Revision 1.2  1991/03/22 23:02:34  steve
+ * Revision 1.3  1991/03/27 00:52:49  steve
+ * *** empty log message ***
+ *
+ * Revision 1.2  1991/03/22  23:02:34  steve
  * Brought up to sync with Intel again.
  *
  * Revision 1.3  1991/03/16  22:19:21  rich
@@ -2156,45 +2159,60 @@ char *memspec;
   current_section->region = lang_memory_region_lookup(memspec);
   stat_ptr = &statement_list;
 }
+/*
+ Create an absolute symbol with the given name with the value of the
+ address of first byte of the section named.
 
+ If the symbol already exists, then do nothing.
+*/
 void
 lang_abs_symbol_at_beginning_of(section, name)
 char *section;
 char *name;
 {
-  extern bfd *output_bfd;
-  extern asymbol *create_symbol();
-  asection *s = bfd_get_section_by_name(output_bfd, section);
-  asymbol *def = create_symbol(name,
-                              BSF_GLOBAL | BSF_EXPORT |
-                              BSF_ABSOLUTE,
-                              (asection *)NULL);
-  if (s != (asection *)NULL) {
-    def->value = s->vma;
-  }
-  else {
-    def->value = 0;
+  if (ldsym_get_soft(name) == (asymbol *)NULL) {
+    extern bfd *output_bfd;
+    extern asymbol *create_symbol();
+    asection *s = bfd_get_section_by_name(output_bfd, section);
+    asymbol *def = create_symbol(name,
+                                BSF_GLOBAL | BSF_EXPORT |
+                                BSF_ABSOLUTE,
+                                (asection *)NULL);
+    if (s != (asection *)NULL) {
+      def->value = s->vma;
+    }
+    else {
+      def->value = 0;
+    }
   }
 }
 
+/*
+ Create an absolute symbol with the given name with the value of the
+ address of the first byte after the end of the section named.
+
+ If the symbol already exists, then do nothing.
+*/
 void
 lang_abs_symbol_at_end_of(section, name)
 char *section;
 char *name;
 {
-  extern bfd *output_bfd;
-  extern asymbol *create_symbol();
-  asection *s = bfd_get_section_by_name(output_bfd, section);
-  /* Add a symbol called _end */
-  asymbol *def = create_symbol(name,
-                              BSF_GLOBAL | BSF_EXPORT |
-                              BSF_ABSOLUTE,
-                              (asection *)NULL);
-  if (s != (asection *)NULL) {
-    def->value = s->vma + s->size;
-  }
-  else {
-    def->value = 0;
+  if (ldsym_get_soft(name) == (asymbol *)NULL) {
+    extern bfd *output_bfd;
+    extern asymbol *create_symbol();
+    asection *s = bfd_get_section_by_name(output_bfd, section);
+    /* Add a symbol called _end */
+    asymbol *def = create_symbol(name,
+                                BSF_GLOBAL | BSF_EXPORT |
+                                BSF_ABSOLUTE,
+                                (asection *)NULL);
+    if (s != (asection *)NULL) {
+      def->value = s->vma + s->size;
+    }
+    else {
+      def->value = 0;
+    }
   }
 }