]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2001-12-18 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 18 Dec 2001 19:03:23 +0000 (19:03 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 18 Dec 2001 19:03:23 +0000 (19:03 +0000)
* elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP.

bfd/ChangeLog
bfd/elf.c

index b5704e533875a2eee7c0157598c73e9ac4ba6785..684573078c2ec2147a0e4e060d9c2f1cecae1035 100644 (file)
@@ -1,3 +1,7 @@
+2001-12-18  H.J. Lu <hjl@gnu.org>
+
+       * elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP.
+
 2001-12-18  H.J. Lu <hjl@gnu.org>
 
        * elf.c (_bfd_elf_copy_private_bfd_data): Update comments.
index 6589bc9ee007310c24b2db9b1eb0c7856d6ac032..65e108adbd82dcb3f378ad827ea92a0175e969cf 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -784,7 +784,8 @@ _bfd_elf_merge_sections (abfd, info)
   return true;
 }
 \f
-/* Copy the program header from one object module to another */
+/* Copy the program header and other data from one object module to
+   another.  */
 
 boolean
 _bfd_elf_copy_private_bfd_data (ibfd, obfd)
@@ -799,6 +800,7 @@ _bfd_elf_copy_private_bfd_data (ibfd, obfd)
              || (elf_elfheader (obfd)->e_flags
                  == elf_elfheader (ibfd)->e_flags));
 
+  elf_gp (obfd) = elf_gp (ibfd);
   elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
   elf_flags_init (obfd) = true;
   return true;