This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED PATCH] missing eh_frame bits in parameterize elf64-x86-64 PLT generation


In my last change I forgot the uses of the eh_frame information.

Committed as obviously correct.  Still passing all 'make check' on
x86_64-linux-gnu native.


Thanks,
Roland


bfd/
	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
	elf_x86_64_backend_data parameters for plt_eh_frame.

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0a674b8..f967d45 100644
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index c0a4493..51204a5 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -981,6 +981,8 @@ elf_x86_64_create_dynamic_sections (bfd *dynobj,
       && bfd_get_section_by_name (dynobj, ".eh_frame") == 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;
       htab->plt_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))
 	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
 	= bfd_alloc (dynobj, htab->plt_eh_frame->size);
-      memcpy (htab->plt_eh_frame->contents, elf_x86_64_eh_frame_plt,
-	      sizeof (elf_x86_64_eh_frame_plt));
+      memcpy (htab->plt_eh_frame->contents,
+              abed->eh_frame_plt, abed->eh_frame_plt_size);
     }
   return TRUE;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]