aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-12-18 19:03:23 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-12-18 19:03:23 +0000
commit0ac4564efc0c136578a84b12a073cc0876f812f8 (patch)
tree3b44520094f4deee7cd6b2692d781d117a92e208 /bfd
parent67a59bc02d4e7bd331e648efcf1d5a09fe048c56 (diff)
downloadgdb-0ac4564efc0c136578a84b12a073cc0876f812f8.zip
gdb-0ac4564efc0c136578a84b12a073cc0876f812f8.tar.gz
gdb-0ac4564efc0c136578a84b12a073cc0876f812f8.tar.bz2
2001-12-18 H.J. Lu <hjl@gnu.org>
* elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b5704e5..6845730 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,9 @@
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.
2001-12-18 H.J. Lu <hjl@gnu.org>
diff --git a/bfd/elf.c b/bfd/elf.c
index 6589bc9..65e108a 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -784,7 +784,8 @@ _bfd_elf_merge_sections (abfd, info)
return true;
}
-/* 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;