]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elflink.h (elf_bfd_final_link): Set the value of a section
authorIan Lance Taylor <ian@airs.com>
Thu, 20 Mar 1997 17:40:06 +0000 (17:40 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 20 Mar 1997 17:40:06 +0000 (17:40 +0000)
symbol to the section address unless doing a relocateable link.

bfd/ChangeLog
bfd/elflink.h

index 6a82698648c7b085492e06e60cbe59be73ba9629..ca73a71a01be535861158e7c54015b3e4f0c7e67 100644 (file)
@@ -1,3 +1,14 @@
+Thu Mar 20 12:39:02 1997  Ian Lance Taylor  <ian@cygnus.com>
+
+       * elflink.h (elf_bfd_final_link): Set the value of a section
+       symbol to the section address unless doing a relocateable link.
+
+Tue Mar 18 23:03:17 1997  Richard Henderson  <rth@tamu.edu>
+
+       * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't create
+       .plt entry if we've taken the function's address.
+       (elf64_alpha_merge_gots): Merge collected flags info as well.
+
 Tue Mar 18 22:40:09 1997  H.J. Lu  <hjl@lucon.org>
 
        * Many files: Add function prototypes.
index dee5a8a66f651236858bff645bea110ffd8cc3d5..6207595678cdbf3579d89f3f6341b218da095cf2 100644 (file)
@@ -3328,7 +3328,6 @@ elf_bfd_final_link (abfd, info)
      outputting relocs.  */
   if (info->strip != strip_all || info->relocateable)
     {
-      elfsym.st_value = 0;
       elfsym.st_size = 0;
       elfsym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
       elfsym.st_other = 0;
@@ -3338,6 +3337,10 @@ elf_bfd_final_link (abfd, info)
          if (o != NULL)
            o->target_index = abfd->symcount;
          elfsym.st_shndx = i;
+         if (info->relocateable || o == NULL)
+           elfsym.st_value = 0;
+         else
+           elfsym.st_value = o->vma;
          if (! elf_link_output_sym (&finfo, (const char *) NULL,
                                     &elfsym, o))
            goto error_return;