Jakub Jelinek <jj@ultra.linux.cz>
authorRichard Henderson <rth@redhat.com>
Mon, 2 Aug 1999 22:31:18 +0000 (22:31 +0000)
committerRichard Henderson <rth@redhat.com>
Mon, 2 Aug 1999 22:31:18 +0000 (22:31 +0000)
        * elflink.h (elf_bfd_final_link): Copy the whole isym, not just
        some fields.
        * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
        variables and initialize them.

bfd/ChangeLog
bfd/elf64-sparc.c
bfd/elflink.h

index 13afd20454b1e597650af4b5fd2fd64ee798effb..0b574426a9624ed1f5b7a97f8dee316eae93b0f3 100644 (file)
@@ -1,3 +1,10 @@
+1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
+
+       * elflink.h (elf_bfd_final_link): Copy the whole isym, not just
+       some fields.
+       * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
+       variables and initialize them.
+
 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
 
        * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where
index 733ea5e5c798b3af45ae02d626db70b509859f2f..e98f1be893bfe68b95fbd911e5e538f60204bfa4 100644 (file)
@@ -1403,6 +1403,8 @@ sparc64_elf_output_arch_syms (output_bfd, info, finfo, func)
      to back up symtab->sh_info.  */
   if (elf_hash_table (info)->dynlocal)
     {
+      bfd * dynobj = elf_hash_table (info)->dynobj;
+      asection *dynsymsec = bfd_get_section_by_name (dynobj, ".dynsym");
       struct elf_link_local_dynamic_entry *e;
 
       for (e = elf_hash_table (info)->dynlocal; e ; e = e->next)
index cfb49098827c4b8d4b6727feeb45804b68b87397..7b3a41725cec720c7d4be92508cbb96f8b8bf3f5 100644 (file)
@@ -4250,19 +4250,12 @@ elf_bfd_final_link (abfd, info)
            {
              asection *s;
 
-             sym.st_size = e->isym.st_size;
-             sym.st_other = e->isym.st_other;
-
-             /* Note that we saved a word of storage and overwrote
+             /* Copy the internal symbol as is.
+                Note that we saved a word of storage and overwrote
                  the original st_name with the dynstr_index.  */
-             sym.st_name = e->isym.st_name;
+              sym = e->isym;
 
-             if (e->isym.st_shndx == 0 || e->isym.st_shndx >= SHN_LORESERVE)
-               {
-                 sym.st_shndx = e->isym.st_shndx;
-                 sym.st_value = e->isym.st_value;
-               }
-             else
+             if (e->isym.st_shndx > 0 && e->isym.st_shndx < SHN_LORESERVE)
                {
                  s = bfd_section_from_elf_index (e->input_bfd,
                                                  e->isym.st_shndx);