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]

Re: Misaligned .bss section for PE?


"Danny Smith" <dansmister@gmail.com> ååæææé:9c03c2dd0806022004w44abf728u1000465ae1c1c1fc@mail.gmail.com...
On Mon, Jun 2, 2008 at 8:28 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
"Danny Smith" <dansmister@gmail.com>
ååæææé:9c03c2dd0805291425n38aeb9b1le9b202d2feeda0b@mail.gmail.com...

see http://sourceware.org/bugzilla/show_bug.cgi?id=5226, in particular the testcase in comment #1

Note PE COFF does not support aligned common , so you may need to add
__attribute__((no_common)) to variable.



Thanks Danny! I saw that the bug was committed last November and I wonder
if
my problematic as (labeling itself as "GNU assembler (GNU Binutils)
2.18.50.20080109") has had the fix?



It should. Can you provide a testcase where you are getting unexpected results?



I only observe the problem when building mplayer under mingw32, which is
quite a big program that uses SSE a lot, so a misaligned static leads to
crashes. I'm still trying to figure out a minimal set.

Is mplayer a multithread app. If so you will need to take extra care with thread-start functions See gcc info on 'force_align_arg_pointer' and mingw-user list archive on SSE multithread isues.


Indeed they've done this for thread entries, but the problem I met has nothing to do with multithreading. A static array that has been marked as __attribute__((aligned(16))) is actually aligned on 8-byte boundary only, and then the program performs a "mulps" over it.
--
Zuxy




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