Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/toolchain/bfd Make sure that non-symbolic GOT refer...



details:   https://anonhg.NetBSD.org/src/rev/72d9b055e0fd
branches:  trunk
changeset: 522442:72d9b055e0fd
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Feb 19 06:16:35 2002 +0000

description:
Make sure that non-symbolic GOT references are converted back to
PC32 relocs for -Bstatic or -Bsymbolic links.

>From Matt Thomas.

diffstat:

 gnu/dist/toolchain/bfd/elf32-vax.c |  25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diffs (37 lines):

diff -r 10d046400836 -r 72d9b055e0fd gnu/dist/toolchain/bfd/elf32-vax.c
--- a/gnu/dist/toolchain/bfd/elf32-vax.c        Tue Feb 19 05:05:38 2002 +0000
+++ b/gnu/dist/toolchain/bfd/elf32-vax.c        Tue Feb 19 06:16:35 2002 +0000
@@ -1682,20 +1682,21 @@
                BFD_ASSERT (sgot != NULL);
              }
 
+           if (!elf_hash_table (info)->dynamic_sections_created
+               || (info->shared
+                && info->symbolic
+                && (h == NULL
+                 || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))))
+             {
+               /* This is actually a static link, or it is a
+                  -Bsymbolic link and the symbol is defined
+                  locally.  Change the GOT32 entry to a PC32
+                  entry. */
+               break;
+             }
+
            if (h != NULL)
              {
-               if (!elf_hash_table (info)->dynamic_sections_created
-                   || (info->shared
-                       && info->symbolic
-                       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
-                 {
-                   /* This is actually a static link, or it is a
-                      -Bsymbolic link and the symbol is defined
-                      locally.  Change the GOT32 entry to a PC32
-                      entry. */
-                   break;
-                 }
-
                off = h->got.offset;
                BFD_ASSERT (off != (bfd_vma) -1);
 



Home | Main Index | Thread Index | Old Index