* Makefile.in: Add dependency for $(EMULATION_OFILES).
[deliverable/binutils-gdb.git] / ld / ldindr.c
index 82efe33a653c726f829e39f336904bfea25020fb..f52c950cfb045485f54a47ffbbfbf51cc0479136 100644 (file)
@@ -1,6 +1,29 @@
+
 /* ldindr.c
    Handle indirect symbols.
 
+   Copyright (C) 1991 Free Software Foundation, Inc.
+   Written by Steve Chamberlain steve@cygnus.com
+
+   This file is part of GLD, the Gnu Linker.
+
+   GLD is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   GLD is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GLD; see the file COPYING.  If not, write to
+   the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  
+
+*/
+
+/*
    An indirect symbol is where a global symbol in one file say's that
    all refs like it should be turned into refs of the symbol pointed
    at by the value of the indirect symbol.
@@ -25,9 +48,9 @@
 
 
 static asymbol **
-DEFUN(move_it,(a_list, b_list),
-asymbol **a_list AND
-asymbol **b_list)
+move_it (a_list, b_list)
+     asymbol **a_list;
+     asymbol **b_list;
 {
   asymbol **head = a_list;
   asymbol **cursor = head;
@@ -48,15 +71,15 @@ asymbol **b_list)
 
 #if 0
 void 
-DEFUN(copy_over,(ldsym, bfdsym),
-   ldsym_type *ldsym AND
-   asymbol **bfdsym)
+copy_over (ldsym, bfdsym)
+     ldsym_type *ldsym;
+     asymbol **bfdsym;
 {
   while (list && *list)
-  {
-    refize(Q_enter_global_ref(list, name);
-    list = (asymbol **)((*list)->udata);
-  }
+    {
+      refize(enter_global_ref(list, name));
+      list = (asymbol **)((*list)->udata);
+    }
 }
 #endif
 
@@ -64,8 +87,8 @@ DEFUN(copy_over,(ldsym, bfdsym),
    refs to the symbol are patched to know the alias - but we still
    have to fix all the old ones */
 void 
-DEFUN(add_indirect,(ptr),
-asymbol **ptr)
+add_indirect (ptr)
+     asymbol **ptr;
 {
   asymbol **p;
   ldsym_type *lgs = ldsym_get((*ptr)->name);
@@ -78,7 +101,7 @@ asymbol **ptr)
 
   if (lgs->sdefs_chain && lgs->sdefs_chain[0]) 
   {
-    einfo("indirect symbol already has definition %s",   lgs->sdefs_chain[0]);
+    einfo("indirect symbol already has definition %s\n",   lgs->sdefs_chain[0]);
   }
   new->scoms_chain = move_it(new->scoms_chain, lgs->scoms_chain);
   lgs->scoms_chain = 0;
@@ -93,6 +116,8 @@ asymbol **ptr)
   {
     refize(new, new->scoms_chain);
   }    
+  lgs->sdefs_chain = (asymbol **)new;
+  lgs->srefs_chain = ptr;
 }
 
 
This page took 0.02377 seconds and 4 git commands to generate.