Project

General

Profile

Actions

Bug #2115

closed

md5 assembly doesn't compile with gas 2.22

Added by Theo Schlossnagle over 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Low
Category:
kernel
Start date:
2012-02-11
Due date:
% Done:

100%

Estimated time:
1.00 h
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

/usr/bin/perl /code/omni-os-151002/illumos-omni-os/usr/src/common/crypto/md5/amd64/md5_amd64.pl md5_amd64.s
/code/omni-os-151002/illumos-omni-os/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/aw  -xarch=amd64 -P -Ui386 -U__i386 -DTEXT_DOMAIN=\"SUNW_OST_OSLIB\" -D_TS_ERRNO  -I/code/omni-os-151002/illumos-omni-os/proto/root_i386/usr/include    -D_ASM -o pics/md5_amd64.o md5_amd64.s
md5_amd64.s: Assembler messages:
md5_amd64.s:51: Error: 0xd76aa478 out range of signed 32bit displacement
md5_amd64.s:60: Error: 0xe8c7b756 out range of signed 32bit displacement
md5_amd64.s:78: Error: 0xc1bdceee out range of signed 32bit displacement
md5_amd64.s:87: Error: 0xf57c0faf out range of signed 32bit displacement
md5_amd64.s:105: Error: 0xa8304613 out range of signed 32bit displacement
md5_amd64.s:114: Error: 0xfd469501 out range of signed 32bit displacement
md5_amd64.s:132: Error: 0x8b44f7af out range of signed 32bit displacement
md5_amd64.s:141: Error: 0xffff5bb1 out range of signed 32bit displacement
md5_amd64.s:150: Error: 0x895cd7be out range of signed 32bit displacement
md5_amd64.s:168: Error: 0xfd987193 out range of signed 32bit displacement
md5_amd64.s:177: Error: 0xa679438e out range of signed 32bit displacement
md5_amd64.s:198: Error: 0xf61e2562 out range of signed 32bit displacement
md5_amd64.s:209: Error: 0xc040b340 out range of signed 32bit displacement
md5_amd64.s:231: Error: 0xe9b6c7aa out range of signed 32bit displacement
md5_amd64.s:242: Error: 0xd62f105d out range of signed 32bit displacement
md5_amd64.s:264: Error: 0xd8a1e681 out range of signed 32bit displacement
md5_amd64.s:275: Error: 0xe7d3fbc8 out range of signed 32bit displacement
md5_amd64.s:297: Error: 0xc33707d6 out range of signed 32bit displacement
md5_amd64.s:308: Error: 0xf4d50d87 out range of signed 32bit displacement
md5_amd64.s:330: Error: 0xa9e3e905 out range of signed 32bit displacement
md5_amd64.s:341: Error: 0xfcefa3f8 out range of signed 32bit displacement
md5_amd64.s:363: Error: 0x8d2a4c8a out range of signed 32bit displacement
md5_amd64.s:375: Error: 0xfffa3942 out range of signed 32bit displacement
md5_amd64.s:383: Error: 0x8771f681 out range of signed 32bit displacement
md5_amd64.s:399: Error: 0xfde5380c out range of signed 32bit displacement
md5_amd64.s:407: Error: 0xa4beea44 out range of signed 32bit displacement
md5_amd64.s:423: Error: 0xf6bb4b60 out range of signed 32bit displacement
md5_amd64.s:431: Error: 0xbebfbc70 out range of signed 32bit displacement
md5_amd64.s:447: Error: 0xeaa127fa out range of signed 32bit displacement
md5_amd64.s:455: Error: 0xd4ef3085 out range of signed 32bit displacement
md5_amd64.s:471: Error: 0xd9d4d039 out range of signed 32bit displacement
md5_amd64.s:479: Error: 0xe6db99e5 out range of signed 32bit displacement
md5_amd64.s:495: Error: 0xc4ac5665 out range of signed 32bit displacement
md5_amd64.s:506: Error: 0xf4292244 out range of signed 32bit displacement
md5_amd64.s:524: Error: 0xab9423a7 out range of signed 32bit displacement
md5_amd64.s:533: Error: 0xfc93a039 out range of signed 32bit displacement
md5_amd64.s:551: Error: 0x8f0ccc92 out range of signed 32bit displacement
md5_amd64.s:560: Error: 0xffeff47d out range of signed 32bit displacement
md5_amd64.s:569: Error: 0x85845dd1 out range of signed 32bit displacement
md5_amd64.s:587: Error: 0xfe2ce6e0 out range of signed 32bit displacement
md5_amd64.s:596: Error: 0xa3014314 out range of signed 32bit displacement
md5_amd64.s:614: Error: 0xf7537e82 out range of signed 32bit displacement
md5_amd64.s:623: Error: 0xbd3af235 out range of signed 32bit displacement
md5_amd64.s:641: Error: 0xeb86d391 out range of signed 32bit displacement

Files

bin-utils-2.22.patch (4.17 KB) bin-utils-2.22.patch Theo Schlossnagle, 2012-02-16 07:33 PM
Actions #1

Updated by Rich Lowe over 11 years ago

As things stand we treat binutils much like GCC and expect you to be using a known good version. I would not be surprised if there were other errors if you deviate.

I'd like to see it get fixed, but doubt I can find the time myself right now.

Patches would be eagerly accepted if they didn't harm the current build.

Actions #2

Updated by Theo Schlossnagle over 11 years ago

This updates assembly around the lea instruction to use signed offsets.

It also alters the mboot.S to use non-offset differences which are equivalent.

These changes make gas from GNU binutils 2.22 happy.

Actions #3

Updated by Robert Mustacchi about 11 years ago

I can confirm that there are no adverse affects against the current binutils with this setup.

Actions #4

Updated by Rich Lowe about 11 years ago

Fantastic. I was going to look into getting these changes integrated when I was done with #1450. If someone wanted to do that in advance, I'd be entirely supportive.

You should make sure:

- GCC3 build using the new gas works
- GCC3 build using the old gas works
- GCC4 build using the new gas works
- GCC4 build using the old gas works

Which is why I was going to do it myself, rather than put anyone else through that effort.

Note that swapping out binutils is insufficient, as GCC tends to figure out things about the assembler at configure time, such that the input of a GCC configured with new binutils is likely to differ from one configured with old (at least somewhat).

Actions #5

Updated by Rich Lowe about 11 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 90 to 100
  • Tags deleted (needs-triage)

Resolved in r13669 commit:779ed9ad03ea

Actions

Also available in: Atom PDF