Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 159197 - gcc produces wrong relocation type with -fvisibility=hidden
Summary: gcc produces wrong relocation type with -fvisibility=hidden
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gcc
Version: 4.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 156322
TreeView+ depends on / blocked
 
Reported: 2005-05-31 14:04 UTC by Petr Rockai
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: RHBA-2005-677
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-05 11:17:13 UTC


Attachments (Terms of Use)
testcase (deleted)
2005-05-31 14:04 UTC, Petr Rockai
no flags Details
gcc34-pr18925.patch (deleted)
2005-05-31 15:58 UTC, Jakub Jelinek
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:677 qe-ready SHIPPED_LIVE gcc bug fix update 2005-10-05 04:00:00 UTC
GNU Compiler Collection 18925 None None None Never

Description Petr Rockai 2005-05-31 14:04:22 UTC
Description of problem:    
 
The attached testcase produces wrong relocation:    
 
RELOCATION RECORDS FOR [.text]:    
OFFSET   TYPE              VALUE    
0000000e R_386_GOTPC       _GLOBAL_OFFSET_TABLE_    
00000014 R_386_GOT32       _ZN16QCoreApplication4selfE    
00000033 R_386_GOTPC       _GLOBAL_OFFSET_TABLE_    
0000003c R_386_GOTOFF      _ZN16QCoreApplication4selfE    
 
The last one is incorrect and causes crashes in applications using Qt4 (qt    
designer, assistant).  
 
[15:38:26] < SadEagle> mornfall: a bit more background: the way variables work  
is that the space for them gets allocated in the binary  
[15:38:45] < SadEagle> mornfall: and the library gets patched up to use the  
binary's copy.  
[15:39:16] < SadEagle> mornfall: with this relocation type, there is nothing  
to patch up in the library -- it basically just gets relative addressing wrt  
to the library base in the final .so  
[15:39:22] < SadEagle> mornfall: so you end up with 2 copies of the symbol  
 
The attached testcase has compile flags in it. The above is output of objdump   
-x on the resulting object file.  
 
Version-Release number of selected component (if applicable):    
gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)

Comment 1 Petr Rockai 2005-05-31 14:04:23 UTC
Created attachment 114995 [details]
testcase

Comment 2 Jakub Jelinek 2005-05-31 15:56:33 UTC
I have tested the PR18925 fix seems to cure this and looks safe for RHEL4 U2.


Comment 3 Jakub Jelinek 2005-05-31 15:58:05 UTC
Created attachment 115004 [details]
gcc34-pr18925.patch

Backported patch.

Comment 6 Jakub Jelinek 2005-07-25 14:06:19 UTC
Should be fixed in gcc-3.4.4-2{,.fc3}.

Comment 11 Red Hat Bugzilla 2005-10-05 11:17:13 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-677.html



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