Bug 45986 - Error in linkage of absolute immediate addr operands
Error in linkage of absolute immediate addr operands
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: nasm (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-06-26 03:18 EDT by Andrew Stevens
Modified: 2007-04-18 12:33 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-07-28 19:56:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Source code demonstrating bug (21.17 KB, text/plain)
2001-06-26 03:20 EDT, Andrew Stevens
no flags Details
The current patch as of 2001-07-02 (1.24 KB, patch)
2001-07-02 16:06 EDT, hjl
no flags Details | Diff

  None (edit)
Description Andrew Stevens 2001-06-26 03:18:49 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.0 i686)

Description of problem:
Some but not all references to absolute addresses as immediate
operands appear are incorrectly linked.  They link to start of the text
segment rather than than the appropriate data / bss addr.


How reproducible:
Always

Steps to Reproduce:

<See attached source-code>

Actual Results:  

0x805b150 <idct_mmx>:   push   %ebp
0x805b151 <idct_mmx+1>: mov    %esp,%ebp
0x805b153 <idct_mmx+3>: push   %eax
0x805b154 <idct_mmx+4>: push   %ebx
0x805b155 <idct_mmx+5>: push   %ecx
0x805b156 <idct_mmx+6>: push   %edx
0x805b157 <idct_mmx+7>: push   %edi
0x805b158 <idct_mmx+8>: mov    0x8(%ebp),%eax
0x805b15b <idct_mmx+11>:        mov    $0x0,%edi
0x805b160 <idct_mmx+16>:        lea    0x805b150,%ebx    
-------------------------------|
Ouch! Points to code seg!  
0x805b166 <idct_mmx+22>:        lea    0x805b150,%ecx
0x805b16c <idct_mmx+28>:        lea    0x8061fa8,%edx
0x805b172 <idct_mmx+34>:        jmp    0x805b190 <lpa>


Additional info:
Comment 1 Andrew Stevens 2001-06-26 03:20:44 EDT
Created attachment 21826 [details]
Source code demonstrating bug
Comment 2 Trond Eivind Glomsrxd 2001-06-29 16:19:40 EDT
Which version of nasm? Does the version in Rawhide (0.98-7) help?
Comment 3 Lans Carstensen 2001-06-29 19:36:23 EDT
We are seeing the same issues.  The problem is actually introduced in the
nasm-0.98-boguself.patch in the nasm source rpm.  Altering the SPEC file to not
patch the source tree and then rebuilding the rpm corrects this issue for us.
Comment 4 Trond Eivind Glomsrxd 2001-07-02 16:03:31 EDT
HJ, this was your patch... comments?
Comment 5 hjl 2001-07-02 16:06:48 EDT
Created attachment 22487 [details]
The current patch as of 2001-07-02
Comment 6 hjl 2001-07-02 16:07:55 EDT
I just uploaded my current patch. It works with all testcases I have.
Comment 7 Trond Eivind Glomsrxd 2001-07-02 16:09:34 EDT
Can the reporter give the updated patch a try?
Comment 8 Trond Eivind Glomsrxd 2001-07-27 23:52:57 EDT
Still awaiting feedback from the reporter on whether or not the patch helps.
Comment 9 redhat-bugs2eran 2001-07-28 18:41:13 EDT
FYI, the proposed patch fixes a problem with LAME 3.89beta.
It dumps core when compiled with nasm-0.98-7 but works with the proposed patch.

Package: ftp://lame.sourceforge.net/pub/lame/src/lame3.89beta.tar.gz
Build and test command:
  bash%  CC=kgcc  ./configure --enable-nasm  --enable-extopt=full ; make ; make test

Note that when gcc-2.96 is used instead of kgcc (egcs-2.91.66) other problems occur, unrelated to nasm.
Comment 10 redhat-bugs2eran 2001-07-28 19:56:01 EDT
Correction to last note: the build command is just
    CC=kgcc  ./configure --enable-nasm ; make ; make test
Comment 11 Trond Eivind Glomsrxd 2001-08-07 14:04:55 EDT
Fix in nasm-0.98-8

Note You need to log in before you can comment on or make changes to this bug.