OSDN Git Service

Add support for -z nocopyreloc.
authorAlan Modra <amodra@bigpond.net.au>
Wed, 3 Oct 2001 15:11:47 +0000 (15:11 +0000)
committerAlan Modra <amodra@bigpond.net.au>
Wed, 3 Oct 2001 15:11:47 +0000 (15:11 +0000)
bfd/ChangeLog
bfd/elf32-i386.c
include/ChangeLog
include/bfdlink.h

index c1ce396..d898b1d 100644 (file)
@@ -1,3 +1,7 @@
+2001-10-03  Vassili Karpov  <malc@pulsesoft.com>
+
+       * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
+
 2001-10-03  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
 
        * elf64-mips.c (elf_backend_may_use_rela_p): New define.
index 719a209..e249304 100644 (file)
@@ -1127,6 +1127,13 @@ elf_i386_adjust_dynamic_symbol (info, h)
   if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
     return true;
 
+  /* If -z nocopyreloc was given, we won't generate them either.  */
+  if (info->nocopyreloc)
+    {
+      h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+      return true;
+    }
+
   eh = (struct elf_i386_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
index 99bd932..030ebfe 100644 (file)
@@ -1,3 +1,7 @@
+2001-10-03  Vassili Karpov  <malc@pulsesoft.com>
+
+       * bfdlink.h (struct bfd_link_info): Add nocopyreloc field.
+
 2001-09-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * libiberty.h (reconcat): New function.
index 9ada606..0865594 100644 (file)
@@ -294,6 +294,10 @@ struct bfd_link_info
      and sorted so that relocs against the same symbol come together.  */
   boolean combreloc;
 
+  /* True if executable should not contain copy relocs.
+     Setting this true may result in a non-sharable text segment.  */
+  boolean nocopyreloc;
+
   /* How many spare .dynamic DT_NULL entries should be added?  */
   unsigned int spare_dynamic_tags;
 };