Opened 9 years ago

Closed 8 years ago

#234 closed defect (fixed)

ld: Align .text by 16 bytes

Reported by: komh 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 komh 9 years ago.
Align .text by 16 bytes
ld.zip (46.1 KB) - added by komh 9 years ago.
Patched ld.exe
segtest.zip (1.4 KB) - added by komh 8 years ago.
testcase for crash of a new ld

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by komh

Align .text by 16 bytes

Changed 9 years ago by komh

Patched ld.exe

comment:1 Changed 8 years ago by bird

  • Milestone set to libc-0.6.5
  • Priority changed from high to normal
  • Resolution set to fixed
  • Status changed from new to closed
  • Summary changed from Align .text by 16 bytes to ld: Align .text by 16 bytes
  • Version set to 0.6.4

Addressed in r3749 and r3750. Case closed.

comment:2 Changed 8 years ago by komh

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 8 years ago by komh

testcase for crash of a new ld

comment:3 Changed 8 years ago by bird

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in r3763 and r3764. Thanks for noticing.

Note: See TracTickets for help on using tickets.