* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
authorDaniel Jacobowitz <drow@false.org>
Fri, 20 May 2005 22:02:08 +0000 (22:02 +0000)
committerDaniel Jacobowitz <drow@false.org>
Fri, 20 May 2005 22:02:08 +0000 (22:02 +0000)
copy relocations for VxWorks.

bfd/ChangeLog
bfd/elf32-i386.c

index a32d1fced2c95350dd7cee7b36730717f890646e..d05d1853a6adff92d3ea823e5718a0ea453be985 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-20  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
+       copy relocations for VxWorks.
+
 2005-05-20  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
index bfc3417c10cc1019adeb6a9ea29fb298356bfde1..3e5f33939a47718c1a8316b5702c6530c1bf3d49 100644 (file)
@@ -1431,7 +1431,13 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
       return TRUE;
     }
 
-  if (ELIMINATE_COPY_RELOCS)
+  htab = elf_i386_hash_table (info);
+
+  /* If there aren't any dynamic relocs in read-only sections, then
+     we can keep the dynamic relocs and avoid the copy reloc.  This
+     doesn't work on VxWorks, where we can not have dynamic relocations
+     (other than copy and jump slot relocations) in an executable.  */
+  if (ELIMINATE_COPY_RELOCS && !htab->is_vxworks)
     {
       struct elf_i386_link_hash_entry * eh;
       struct elf_i386_dyn_relocs *p;
@@ -1444,8 +1450,6 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
            break;
        }
 
-      /* If we didn't find any dynamic relocs in read-only sections, then
-        we'll be keeping the dynamic relocs and avoiding the copy reloc.  */
       if (p == NULL)
        {
          h->non_got_ref = 0;
@@ -1463,8 +1467,6 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
      both the dynamic object and the regular object will refer to the
      same memory location for the variable.  */
 
-  htab = elf_i386_hash_table (info);
-
   /* We must generate a R_386_COPY reloc to tell the dynamic linker to
      copy the initial value out of the dynamic object and into the
      runtime process image.  */
This page took 0.031181 seconds and 4 git commands to generate.