coordinate info->symbolic and info->allow_shlib_undefined
authorNick Clifton <nickc@redhat.com>
Thu, 20 Sep 2001 10:37:35 +0000 (10:37 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 20 Sep 2001 10:37:35 +0000 (10:37 +0000)
17 files changed:
bfd/ChangeLog
bfd/elf32-cris.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-m68k.c
bfd/elf32-mips.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf32-sh.c
bfd/elf32-sparc.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elfxx-ia64.c

index e2fb365912674b5e13ed1f30e3f5251278c95eb8..2a39f18af082616046a2f5f98bee40f20afdbc4c 100644 (file)
@@ -1,3 +1,23 @@
+2001-09-20  John Reiser  <jreiser@BitWagon.com>
+       
+       * elf32-i386.c (elf_i386_relocate_section): coordinate info->symbolic
+         and info->allow_shlib_undefined.
+       * elf32-cris.c: likewise
+       * elf32-hppa.c: likewise
+       * elf32-m68k.c: likewise
+       * elf32-mips.c: likewise
+       * elf32-ppc.c: likewise
+       * elf32-s390.c: likewise
+       * elf32-sh.c: likewise
+       * elf32-sparc.c: likewise
+       * elf64-alpha.c: likewise
+       * elf64-hppa.c: likewise
+       * elf64-ppc.c: likewise
+       * elf64-s390.c: likewise
+       * elf64-sparc.c: likewise
+       * elf64-x86-64.c: likewise
+       * elfxx-ia64.c: likewise
+
 2001-09-18  Bruno Haible  <haible@clisp.cons.org>
 
        * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
index eb9a6f4b0964559d6aa34ec38605bc24311bbe6b..0a94c12f91e132364d0b05b735ca3e79f0de9db8 100644 (file)
@@ -898,7 +898,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
          else if (info->shared
-                  && !info->symbolic
+                  && (!info->symbolic || info->allow_shlib_undefined)
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
index 68a956c079e5649be0162a877445d83181b442d6..a774782ccfdd72569ae5ad2035a45d6f9f7fd7c3 100644 (file)
@@ -3679,7 +3679,7 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
                   && ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
                   && h->elf.type != STT_PARISC_MILLI)
            {
-             if (info->symbolic)
+             if (info->symbolic && !info->allow_shlib_undefined)
                if (!((*info->callbacks->undefined_symbol)
                      (info, h->elf.root.root.string, input_bfd,
                       input_section, rel->r_offset, false)))
index 93dfa5e0cf9fc20cefa2246128955c13692c2987..82c17ce11fa1813b2f13e36f8c7d9693bd29f4b6 100644 (file)
@@ -1549,7 +1549,8 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            ;
-         else if (info->shared && !info->symbolic
+         else if (info->shared
+                  && (!info->symbolic || info->allow_shlib_undefined)
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            ;
index 33de899c50b3d487dce44bb434f36d0ff29f192b..d381be9ce39be651a6bd945c1aaf6477237a962b 100644 (file)
@@ -1474,7 +1474,8 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic
+         else if (info->shared
+                  && (!info->symbolic || info->allow_shlib_undefined)
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
index 1554cce7544898bb5f47738c384bcc154bd27941..14bce733d012678d85d5038b83eef42f9d267254 100644 (file)
@@ -6142,7 +6142,9 @@ mips_elf_calculate_relocation (abfd,
           and check to see if they exist by looking at their
           addresses.  */
        symbol = 0;
-      else if (info->shared && !info->symbolic && !info->no_undefined
+      else if (info->shared
+              && (!info->symbolic || info->allow_shlib_undefined)
+              && !info->no_undefined
               && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
        symbol = 0;
       else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0 ||
index 392d4fd2d59689d0b7a300307532247c4e1b3922..8e7ccd48915e8938a723a1dc029deea39d0066e1 100644 (file)
@@ -3106,7 +3106,9 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic && !info->no_undefined
+         else if (info->shared
+                  && (!info->symbolic || info->allow_shlib_undefined)
+                  && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
          else
index 873f8b66b42f227e89707c584e7325481aaed14f..64e873c7b8e97ef4199a469c5d9921782b6d623e 100644 (file)
@@ -1444,7 +1444,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic
+         else if (info->shared
+                  && (!info->symbolic || info->allow_shlib_undefined)
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
index e8351564fd756d0f0957a405de4d959ab985394f..f8d29d1f9f16f01c02d9362cfd8636d219e2eafe 100644 (file)
@@ -3114,7 +3114,9 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic && !info->no_undefined)
+         else if (info->shared
+              && (!info->symbolic || info->allow_shlib_undefined)
+              && !info->no_undefined)
            relocation = 0;
          else
            {
index 17078303bb81d0cf6b00c49f76a58faad125248d..93141a81898a96fbefa9b7517cc95fd7ec25d555 100644 (file)
@@ -1237,7 +1237,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic
+         else if (info->shared
+                  && (!info->symbolic || info->allow_shlib_undefined)
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
index 79cebc15bef4c71903edda2e55885a5db70a1d5c..00d8184bef35232decde3e7d577d9d20a9d4e52a 100644 (file)
@@ -3346,7 +3346,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic
+         else if (info->shared
+                  && (!info->symbolic || info->allow_shlib_undefined)
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
            relocation = 0;
index d09a93f90a49d1f7d28ad9ae26236828b328e40b..98d688876c8550127fb1182155f724ca763b8fa1 100644 (file)
@@ -746,7 +746,8 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs)
         have yet been processed.  Do something with what we know, as
         this may help reduce memory usage and processing time later.  */
       maybe_dynamic = false;
-      if (h && ((info->shared && ! info->symbolic)
+      if (h && ((info->shared
+                   && (!info->symbolic || info->allow_shlib_undefined) )
                || ! (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
                || h->root.type == bfd_link_hash_defweak))
        maybe_dynamic = true;
@@ -973,7 +974,7 @@ elf64_hppa_dynamic_symbol_p (h, info)
   if (h->root.root.string[0] == '$' && h->root.root.string[1] == '$')
     return false;
 
-  if ((info->shared && !info->symbolic)
+  if ((info->shared && (!info->symbolic || info->allow_shlib_undefined))
       || ((h->elf_link_hash_flags
           & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR))
          == (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)))
index d5a340d8c4a017759d9df07a5c4e34a45caf4b05..78e9815c497c16697dae21997a5b19673e777a65 100644 (file)
@@ -2847,7 +2847,9 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic && !info->no_undefined)
+         else if (info->shared
+              && (!info->symbolic || info->allow_shlib_undefined)
+              && !info->no_undefined)
            relocation = 0;
          else
            {
index 65041a6357a76d24eb720e0fb0b1f34d01ae86bd..7bc64292b5dbee10ea068c64936955a1cbfbc1a0 100644 (file)
@@ -1432,7 +1432,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic
+         else if (info->shared
+                  && (!info->symbolic || info->allow_shlib_undefined)
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
index 0742e22790d1d18d669602e8d592939d39a504a4..f5ba083a4ee6f2da30306792ddef60db235339d3 100644 (file)
@@ -2069,7 +2069,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic
+         else if (info->shared
+                  && (!info->symbolic || info->allow_shlib_undefined)
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
index 24eb9f76a0b2fe4612ed60dff3bfe3b9669f05cd..0b8d345703a46d3b335a75ce6a400699694f7c5e 100644 (file)
@@ -1300,7 +1300,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic && !info->no_undefined
+         else if (info->shared
+                  && (!info->symbolic || info->allow_shlib_undefined)
+                  && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
          else
index 4ba466587f0b9babade2e235db16d9fe096a6367..d8f1de765c152a0c5aa86a750ac72efa8c97bb5a 100644 (file)
@@ -1429,7 +1429,7 @@ elfNN_ia64_dynamic_symbol_p (h, info)
       || h->root.type == bfd_link_hash_defweak)
     return true;
 
-  if ((info->shared && !info->symbolic)
+  if ((info->shared && (!info->symbolic || info->allow_shlib_undefined))
       || ((h->elf_link_hash_flags
           & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR))
          == (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)))
@@ -2020,7 +2020,8 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
         have yet been processed.  Do something with what we know, as
         this may help reduce memory usage and processing time later.  */
       maybe_dynamic = false;
-      if (h && ((info->shared && ! info->symbolic)
+      if (h && ((info->shared
+                     && (!info->symbolic || info->allow_shlib_undefined))
                || ! (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
                || h->root.type == bfd_link_hash_defweak
                || elfNN_ia64_aix_vec (abfd->xvec)))
@@ -3509,7 +3510,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            undef_weak_ref = true;
-         else if (info->shared && !info->symbolic
+         else if (info->shared
+                  && (!info->symbolic || info->allow_shlib_undefined)
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            ;