aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2013-08-23 19:29:13 +0000
committerH.J. Lu <hjl.tools@gmail.com>2013-08-23 19:29:13 +0000
commitf8222080f6f2dada74ea43ee0b0b0ab7bff4b2a5 (patch)
treec90825c8859a7998d790ff51b97cb9d09e1358cb
parent5e080929e1d05b2ef3678aa2ae66b7fa308c8045 (diff)
downloadgdb-f8222080f6f2dada74ea43ee0b0b0ab7bff4b2a5.zip
gdb-f8222080f6f2dada74ea43ee0b0b0ab7bff4b2a5.tar.gz
gdb-f8222080f6f2dada74ea43ee0b0b0ab7bff4b2a5.tar.bz2
Add get_elf_x86_64_arch_data
* elf64-x86-64.c (get_elf_x86_64_arch_data): New. (get_elf_x86_64_backend_data): Use it. (elf_x86_64_size_dynamic_sections): Likewise.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-x86-64.c10
2 files changed, 12 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0b07c5e..6e34cc7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2013-08-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf64-x86-64.c (get_elf_x86_64_arch_data): New.
+ (get_elf_x86_64_backend_data): Use it.
+ (elf_x86_64_size_dynamic_sections): Likewise.
+
2013-08-23 Yuri Chornoivan <yurchor@ukr.net>
PR binutils/15834
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 56a1f81..3352d05 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -628,9 +628,11 @@ struct elf_x86_64_backend_data
unsigned int eh_frame_plt_size;
};
+#define get_elf_x86_64_arch_data(bed) \
+ ((const struct elf_x86_64_backend_data *) (bed)->arch_data)
+
#define get_elf_x86_64_backend_data(abfd) \
- ((const struct elf_x86_64_backend_data *) \
- get_elf_backend_data (abfd)->arch_data)
+ get_elf_x86_64_arch_data (get_elf_backend_data (abfd))
#define GET_PLT_ENTRY_SIZE(abfd) \
get_elf_x86_64_backend_data (abfd)->plt_entry_size
@@ -2906,7 +2908,7 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
&& _bfd_elf_eh_frame_present (info))
{
const struct elf_x86_64_backend_data *arch_data
- = (const struct elf_x86_64_backend_data *) bed->arch_data;
+ = get_elf_x86_64_arch_data (bed);
htab->plt_eh_frame->size = arch_data->eh_frame_plt_size;
}
@@ -2978,7 +2980,7 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
&& htab->plt_eh_frame->contents != NULL)
{
const struct elf_x86_64_backend_data *arch_data
- = (const struct elf_x86_64_backend_data *) bed->arch_data;
+ = get_elf_x86_64_arch_data (bed);
memcpy (htab->plt_eh_frame->contents,
arch_data->eh_frame_plt, htab->plt_eh_frame->size);