mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
elf_x86_64_backend_data parameters for plt_eh_frame. Change-Id: I4e1a7c2787ed1276765e269f50fc8ba89bab41d5
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
2012-03-15 Roland McGrath <mcgrathr@google.com>
|
2012-03-15 Roland McGrath <mcgrathr@google.com>
|
||||||
|
|
||||||
|
* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
|
||||||
|
elf_x86_64_backend_data parameters for plt_eh_frame.
|
||||||
|
|
||||||
* elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
|
* elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
|
||||||
(get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
|
(get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
|
||||||
(elf_x86_64_arch_bed): New variable.
|
(elf_x86_64_arch_bed): New variable.
|
||||||
|
@ -981,6 +981,8 @@ elf_x86_64_create_dynamic_sections (bfd *dynobj,
|
|||||||
&& bfd_get_section_by_name (dynobj, ".eh_frame") == NULL
|
&& bfd_get_section_by_name (dynobj, ".eh_frame") == NULL
|
||||||
&& htab->elf.splt != NULL)
|
&& htab->elf.splt != NULL)
|
||||||
{
|
{
|
||||||
|
const struct elf_x86_64_backend_data *const abed
|
||||||
|
= get_elf_x86_64_backend_data (dynobj);
|
||||||
flagword flags = get_elf_backend_data (dynobj)->dynamic_sec_flags;
|
flagword flags = get_elf_backend_data (dynobj)->dynamic_sec_flags;
|
||||||
htab->plt_eh_frame
|
htab->plt_eh_frame
|
||||||
= bfd_make_section_with_flags (dynobj, ".eh_frame",
|
= bfd_make_section_with_flags (dynobj, ".eh_frame",
|
||||||
@ -989,11 +991,11 @@ elf_x86_64_create_dynamic_sections (bfd *dynobj,
|
|||||||
|| !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 3))
|
|| !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 3))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
htab->plt_eh_frame->size = sizeof (elf_x86_64_eh_frame_plt);
|
htab->plt_eh_frame->size = abed->eh_frame_plt_size;
|
||||||
htab->plt_eh_frame->contents
|
htab->plt_eh_frame->contents
|
||||||
= bfd_alloc (dynobj, htab->plt_eh_frame->size);
|
= bfd_alloc (dynobj, htab->plt_eh_frame->size);
|
||||||
memcpy (htab->plt_eh_frame->contents, elf_x86_64_eh_frame_plt,
|
memcpy (htab->plt_eh_frame->contents,
|
||||||
sizeof (elf_x86_64_eh_frame_plt));
|
abed->eh_frame_plt, abed->eh_frame_plt_size);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user