Add EXTERN references to __ctbpm __gp and __ep.
authorNick Clifton <nickc@redhat.com>
Mon, 2 Sep 2002 17:03:30 +0000 (17:03 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 2 Sep 2002 17:03:30 +0000 (17:03 +0000)
Define TEMPLATE_NAME.
Revert bogus change to ldexp.c

ld/ChangeLog
ld/emulparams/v850.sh
ld/ldexp.c
ld/scripttempl/v850.sc

index f097310f5ea1f9f81f1daad64f91ac787a5e16b2..4a3abd9e8738ab4a02d4499be0423c32257e91f8 100644 (file)
@@ -1,8 +1,8 @@
 2002-09-02  Nick Clifton  <nickc@redhat.com>
 
-       * ldexp.c (exp_fold_tree): If the first attempt to lookup a
-       PROVIDEd symbol fails, look it up again, but this time with
-       the 'create' flag set.
+       * scripttempl/v850.sc: Add EXTERN references to __ctbpm __gp and
+       __ep.
+       * emulparams/v850.sh (TEMPLATE_NAME): Define.
 
 2002-08-30  Nick Clifton  <nickc@redhat.com>
 
index 78bfbd3882df6aa22781a47b9641f62cf96e07c8..96cdc6808848a59c2c3e9a38cd37ad64e0391305 100644 (file)
@@ -12,3 +12,4 @@ ARCH=v850
 MAXPAGESIZE=256
 ENTRY=_start
 EMBEDDED=yes
+TEMPLATE_NAME=elf32
index 6c4937ddaef19561a11822eeaed2fdb93035e785..8e3ea6308e86ebb5ad8d221a4b738f65fcfef62c 100644 (file)
@@ -726,20 +726,22 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
              if (tree->type.node_class == etree_assign)
                create = true;
              else
-               create = false;       
+               create = false;
              h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
                                        create, false, false);
-             
-             if (tree->type.node_class == etree_provide
-                 && (h == NULL
-                     || h->type == bfd_link_hash_undefined
-                     || h->type == bfd_link_hash_common))
-               h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
-                                         true, false, false);
-
              if (h == (struct bfd_link_hash_entry *) NULL)
-               einfo (_("%P%F:%s: hash creation failed\n"),
-                      tree->assign.dst);
+               {
+                 if (tree->type.node_class == etree_assign)
+                   einfo (_("%P%F:%s: hash creation failed\n"),
+                          tree->assign.dst);
+               }
+             else if (tree->type.node_class == etree_provide
+                      && h->type != bfd_link_hash_undefined
+                      && h->type != bfd_link_hash_common)
+               {
+                 /* Do nothing.  The symbol was defined by some
+                    object.  */
+               }
              else
                {
                  /* FIXME: Should we worry if the symbol is already
index 8958321b2b952e053d21084b903b9e0fe1c9fb0a..18ba03a20b6cc7cd0834cb76dce497cdf302295b 100644 (file)
@@ -4,6 +4,7 @@ OUTPUT_FORMAT("elf32-v850", "elf32-v850",
 OUTPUT_ARCH(v850)
 ENTRY(_start)
 SEARCH_DIR(.);
+EXTERN(__ctbp __ep __gp);
 SECTIONS
 {
   /* This saves a little space in the ELF file, since the zda starts
This page took 0.035878 seconds and 4 git commands to generate.