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]

[Patch/PR 3276] Enable 16 byte alignment for PE-COFF linkonce symbols


RE http://sourceware.org/bugzilla/show_bug.cgi?id=3276

The problem in PR 3276 is that we are not allowing anything over 4-byte
alignment in named sections.
In COFF_SECTION_ALIGNMENT_ENTRIES, we do exact matches for .data,
.rdata, and
.text section, but do not do partial matches for wild .data$, .rdata$,
.text$.
sections (linkonce COMDAT sections).


2006-09-29  Danny Smith  <dannysmith@users.sourceforge.net>

	PR 3276
	* pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
	alignment for .data$, .rdata$ and .text$ sections so that sse
and sse2
	code will work for linkonce sections too. 
	* pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
  

Index: pe-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/pe-i386.c,v
retrieving revision 1.10
diff -c -3 -p -r1.10 pe-i386.c
*** pe-i386.c	4 May 2005 15:53:37 -0000	1.10
--- pe-i386.c	28 Sep 2006 00:16:47 -0000
***************
*** 34,43 ****
--- 34,49 ----
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".data"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+ { COFF_SECTION_NAME_PARTIAL_MATCH (".data$"), \
+   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+ { COFF_SECTION_NAME_PARTIAL_MATCH (".rdata$"), \
+   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".text"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+ { COFF_SECTION_NAME_PARTIAL_MATCH (".text$"), \
+   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
Index: pei-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/pei-i386.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 pei-i386.c
*** pei-i386.c	4 May 2005 15:53:37 -0000	1.9
--- pei-i386.c	28 Sep 2006 00:16:47 -0000
***************
*** 35,44 ****
--- 35,50 ----
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".data"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+ { COFF_SECTION_NAME_PARTIAL_MATCH (".data$"), \
+   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+ { COFF_SECTION_NAME_PARTIAL_MATCH (".rdata$"), \
+   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".text"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+ { COFF_SECTION_NAME_PARTIAL_MATCH (".text$"), \
+   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
  { COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
    COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
  { COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \


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