bfd/
authorJakub Jelinek <jakub@redhat.com>
Mon, 19 Apr 2004 14:25:49 +0000 (14:25 +0000)
committerJakub Jelinek <jakub@redhat.com>
Mon, 19 Apr 2004 14:25:49 +0000 (14:25 +0000)
* elf32-sparc.c (elf32_sparc_relocate_section): Handle
relocs against hidden/protected undefweak symbols properly.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
gas/testsuite/
* gas/cfi/cfi-sparc64-1.d: Update.
ld/testsuite/
* ld-elfvsb/elfvsb.exp: XFAIL some tests on sparc64.
* ld-shared/shared.exp: Likewise.

bfd/ChangeLog
bfd/elf32-sparc.c
bfd/elf64-sparc.c
gas/testsuite/ChangeLog
gas/testsuite/gas/cfi/cfi-sparc64-1.d
ld/testsuite/ChangeLog
ld/testsuite/ld-elfvsb/elfvsb.exp
ld/testsuite/ld-shared/shared.exp

index a4544334d8047ac50688febd20322d9ec66e7f59..dda65cd5503dbf4df7d2b14eb4a04ce5550fa0b3 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-19  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf32-sparc.c (elf32_sparc_relocate_section): Handle
+       relocs against hidden/protected undefweak symbols properly.
+       * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+
 2004-04-18  Mark Kettenis  <kettenis@gnu.org>
 
        * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
index 0f94f5f31bb70e8884f3f0bae72373b8ec3f003a..6e1c40b98c17e7489876a3d91a2dc0227768bc3e 100644 (file)
@@ -2374,6 +2374,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
            break;
 
          if ((info->shared
+              && (h == NULL
+                  || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+                  || h->root.type != bfd_link_hash_undefweak)
               && (! howto->pc_relative
                   || (h != NULL
                       && h->dynindx != -1
index 4568a22d6430f672a3c028a6dc62c1462ca75432..4f2832512a1df26414b3db442ae80251f4d7f626 100644 (file)
@@ -2213,6 +2213,13 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                    break;
                  }
 
+               /* FIXME: Dynamic reloc handling really needs to be rewritten.  */
+               if (!skip
+                   && h != NULL
+                   && ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+                   && h->root.type == bfd_link_hash_undefweak)
+                 skip = TRUE, relocate = TRUE;
+
                if (skip)
                  memset (&outrel, 0, sizeof outrel);
                /* h->dynindx may be -1 if the symbol was marked to
index 1e262f1f7ebeafee5662d50a690c8175336865cd..c99e91f5d9474ac30831d3f9a22abe64ed1c74b9 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-19  Jakub Jelinek  <jakub@redhat.com>
+
+       * gas/cfi/cfi-sparc64-1.d: Update.
+
 2004-04-14  Richard Sandiford  <rsandifo@redhat.com>
 
        * gas/mips/vr4122.[sd]: Change option to -mfix-vr4120.
index ffe62392b1deff60a5d96ba7ca5934286cf63b15..10d3ea9a4f52719fa691a72e78c0ad485a5491b3 100644 (file)
@@ -4,7 +4,7 @@
 
 The section .eh_frame contains:
 
-00000000 00000011 00000000 CIE
+00000000 00000014 00000000 CIE
   Version:               1
   Augmentation:          "zR"
   Code alignment factor: 4
@@ -13,13 +13,13 @@ The section .eh_frame contains:
   Augmentation data:     1b
 
   DW_CFA_def_cfa: r14 ofs 2047
+  DW_CFA_nop
+  DW_CFA_nop
+  DW_CFA_nop
 
-00000015 00000017 00000019 FDE cie=00000000 pc=0000001d..0000004d
-  DW_CFA_advance_loc: 4 to 00000021
+00000018 00000014 0000001c FDE cie=00000000 pc=00000020..00000050
+  DW_CFA_advance_loc: 4 to 00000024
   DW_CFA_def_cfa_reg: r30
   DW_CFA_GNU_window_save
   DW_CFA_register: r15 in r31
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
 
index 9f9fab8db746770e4c3210e692e40e7edf86715e..1849b2070a076c75a97c291df1015bc10f179694 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-19  Jakub Jelinek  <jakub@redhat.com>
+
+       * ld-elfvsb/elfvsb.exp: XFAIL some tests on sparc64.
+       * ld-shared/shared.exp: Likewise.
+
 2004-04-14  H.J. Lu  <hongjiu.lu@intel.com>
 
        * ld-scripts/assert.s: Add a newline.
index f1f3f1fdf39531b12fefa87a96d469dee3985045..cd7c15fdb3cca5a7850283e80d1f08c353bfc317 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-visibility tests
-#   Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
+#   Copyright 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -261,6 +261,9 @@ proc visibility_run {visibility} {
                 && ![ string match $visibility "hidden_undef_def" ]
                 && ![ string match $visibility "protected_undef" ] } {
                setup_xfail "s390x-*-linux*"
+               if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {
+                   setup_xfail "sparc*-*-linux*"
+               }
            }
            setup_xfail "x86_64-*-linux*"
            if { ![istarget hppa*64*-*-linux*] } {
@@ -289,6 +292,9 @@ proc visibility_run {visibility} {
                 || [ string match $visibility "protected_weak" ]
                 || [ string match $visibility "normal" ] } {
                setup_xfail "powerpc-*-linux*"
+               if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {
+                   setup_xfail "sparc*-*-linux*"
+               }
            }
            if { ![ string match $visibility "hidden_undef" ]
                 && ![ string match $visibility "protected_undef" ] } {
@@ -358,6 +364,9 @@ proc visibility_run {visibility} {
                     && ![ string match $visibility "hidden_undef_def" ]
                     && ![ string match $visibility "protected_undef" ] } {
                    setup_xfail "s390x-*-linux*"
+                   if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainp.o] } {
+                       setup_xfail "sparc*-*-linux*"
+                   }
                }
                setup_xfail "x86_64-*-linux*"
                if { ![istarget hppa*64*-*-linux*] } {
index 339d3a3abe91ce50273fcb84053d136d37d8cba5..a88cd1c8c8d3ab8418609965e57440e938ceca95 100644 (file)
@@ -203,6 +203,9 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
        if { ![istarget hppa*64*-*-linux*] } {
            setup_xfail "hppa*-*-linux*"
        }
+       if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {
+           setup_xfail "sparc*-*-linux*"
+       }
        setup_xfail "x86_64-*-linux*"
        setup_xfail "s390x-*-linux*"
        shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
@@ -220,6 +223,9 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
        if { ![istarget hppa*64*-*-linux*] } {
            setup_xfail "hppa*-*-linux*"
        }
+       if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {
+           setup_xfail "sparc*-*-linux*"
+       }
        setup_xfail "x86_64-*-linux*"
        shared_test shnp "shared (non PIC, load offset)" \
                mainnp.o sh1np.o sh2np.o shared \
@@ -265,6 +271,9 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m
            if { ![istarget hppa*64*-*-linux*] } {
                setup_xfail "hppa*-*-linux*"
            }
+           if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainp.o] } {
+               setup_xfail "sparc*-*-linux*"
+           }
            setup_xfail "x86_64-*-linux*"
            setup_xfail "s390x-*-linux*"
            shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared