Opened 13 years ago

Closed 12 years ago

#234 closed defect (fixed)

ld: Align .text by 16 bytes

Reported by: KO Myung-Hun Owned by: bird
Priority: normal Milestone: libc-0.6.5
Component: emx Version: 0.6.4
Severity: normal Keywords:
Cc:

Description

Hi/2.

Current, ld aligns .data/.bss by 16 bytes for SSE, but .text by 4 bytes.

Some libraries such as x264 require to align .text by 16 bytes as well.

So there is need to align .text by 16 bytes as well.

Attachments (3)

ld.diff (497 bytes) - added by KO Myung-Hun 13 years ago.
Align .text by 16 bytes
ld.zip (46.1 KB) - added by KO Myung-Hun 13 years ago.
Patched ld.exe
segtest.zip (1.4 KB) - added by KO Myung-Hun 12 years ago.
testcase for crash of a new ld

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by KO Myung-Hun

Attachment: ld.diff added

Align .text by 16 bytes

Changed 13 years ago by KO Myung-Hun

Attachment: ld.zip added

Patched ld.exe

comment:1 Changed 12 years ago by bird

Milestone: libc-0.6.5
Priority: highnormal
Resolution: fixed
Status: newclosed
Summary: Align .text by 16 bytesld: Align .text by 16 bytes
Version: 0.6.4

Addressed in r3749 and r3750. Case closed.

comment:2 Changed 12 years ago by KO Myung-Hun

Resolution: fixed
Status: closedreopened

r3749 and r3750 causes the executable to crash.

I attach a testcase.

To build it, run segmake.cmd. Then run seg.exe. The following is the result

Killed by SIGSEGV
pid=0x061f ppid=0x0549 tid=0x0001 slot=0x00b7 pri=0x0200 mc=0x0001
G:\EX\SEG.EXE
SEG 0:000001f8
cs:eip=005b:000101f8      ss:esp=0053:0212ff8c      ebp=0212ffa0
 ds=0053      es=0053      fs=150b      gs=0000     efl=00012283
eax=000100df ebx=0212ffa8 ecx=00000001 edx=00000001 edi=00000000 esi=00000000
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.

Changed 12 years ago by KO Myung-Hun

Attachment: segtest.zip added

testcase for crash of a new ld

comment:3 Changed 12 years ago by bird

Resolution: fixed
Status: reopenedclosed

Fixed in r3763 and r3764. Thanks for noticing.

Note: See TracTickets for help on using tickets.