aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-01-10 11:30:25 -0800
committerH.J. Lu <hjl.tools@gmail.com>2017-01-10 11:30:25 -0800
commitf129e49f4d07f4d36319ac757fdcf3a8ce7d605b (patch)
treea1481c3a22710d99770720d1bedd1bc782c15543 /bfd
parente92372274e77fc0ce87f35a833de8a60d733580a (diff)
downloadfsf-binutils-gdb-f129e49f4d07f4d36319ac757fdcf3a8ce7d605b.zip
fsf-binutils-gdb-f129e49f4d07f4d36319ac757fdcf3a8ce7d605b.tar.gz
fsf-binutils-gdb-f129e49f4d07f4d36319ac757fdcf3a8ce7d605b.tar.bz2
Don't use elf_i386_eh_frame_plt directly
Use eh_frame_plt_size and eh_frame_plt from elf_i386_plt_layout for .eh_frame covering the .plt section. * elf32-i386.c (elf_i386_size_dynamic_sections): Set plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-i386.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 83a7116..09121d2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Set
+ plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
+
2017-01-09 Nick Clifton <nickc@redhat.com>
* dwarf2.c (lookup_address_in_function_table): Return early if
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index e977dd7..a2da987 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -3385,7 +3385,8 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
&& htab->elf.splt->size != 0
&& !bfd_is_abs_section (htab->elf.splt->output_section)
&& _bfd_elf_eh_frame_present (info))
- htab->plt_eh_frame->size = sizeof (elf_i386_eh_frame_plt);
+ htab->plt_eh_frame->size
+ = get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt_size;
/* We now have determined the sizes of the various dynamic sections.
Allocate memory for them. */
@@ -3468,8 +3469,9 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
if (htab->plt_eh_frame != NULL
&& htab->plt_eh_frame->contents != NULL)
{
- memcpy (htab->plt_eh_frame->contents, elf_i386_eh_frame_plt,
- sizeof (elf_i386_eh_frame_plt));
+ memcpy (htab->plt_eh_frame->contents,
+ get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt,
+ htab->plt_eh_frame->size);
bfd_put_32 (dynobj, htab->elf.splt->size,
htab->plt_eh_frame->contents + PLT_FDE_LEN_OFFSET);
}