This is the mail archive of the binutils-cvs@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]

[binutils-gdb] Allow for compilers that do not produce aligned .rdat sections in PE format files.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=73af69e74974eaa155eec89867e3ccc77ab39f6d

commit 73af69e74974eaa155eec89867e3ccc77ab39f6d
Author: Marc <marc@groundctl.com>
Date:   Fri Nov 9 11:13:50 2018 +0000

    Allow for compilers that do not produce aligned .rdat sections in PE format files.
    
    	PR 23872
    	* scripttempl/pep.sc (pe.sc): Ensure rdata_runtime_pseudo_relocs
    	are aligned.
    	* scripttempl/pep.sc (pep.sc): Likewise.

Diff:
---
 ld/ChangeLog          | 7 +++++++
 ld/scripttempl/pe.sc  | 1 +
 ld/scripttempl/pep.sc | 1 +
 3 files changed, 9 insertions(+)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 0346ebb..840983b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2018-11-09  Marc  <marc@groundctl.com>
+
+	PR 23872
+	* scripttempl/pep.sc (pe.sc): Ensure rdata_runtime_pseudo_relocs
+	are aligned.
+	* scripttempl/pep.sc (pep.sc): Likewise.
+
 2018-11-06  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* testsuite/config/default.exp (ELFEDIT): New.
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc
index 8fdeaff..2968f8e 100644
--- a/ld/scripttempl/pe.sc
+++ b/ld/scripttempl/pe.sc
@@ -161,6 +161,7 @@ SECTIONS
   .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
   {
     ${R_RDATA}
+    . = ALIGN(4);
     ${RELOCATING+__rt_psrelocs_start = .;}
     ${RELOCATING+KEEP(*(.rdata_runtime_pseudo_reloc))}
     ${RELOCATING+__rt_psrelocs_end = .;}
diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc
index a7157dc..cdef041 100644
--- a/ld/scripttempl/pep.sc
+++ b/ld/scripttempl/pep.sc
@@ -161,6 +161,7 @@ SECTIONS
   .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
   {
     ${R_RDATA}
+    . = ALIGN(4);
     ${RELOCATING+__rt_psrelocs_start = .;}
     ${RELOCATING+KEEP(*(.rdata_runtime_pseudo_reloc))}
     ${RELOCATING+__rt_psrelocs_end = .;}


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