Bug 87452 - visibility doesn't work right.
visibility doesn't work right.
Status: CLOSED WONTFIX
Product: Red Hat Linux Beta
Classification: Retired
Component: gcc (Show other bugs)
alpha 1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-26 18:46 EST by hjl
Modified: 2007-04-18 12:52 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-07 06:08: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)
A testcase. (852 bytes, application/octet-stream)
2003-03-26 18:47 EST, hjl
no flags Details
A patch to fix the problem. (698 bytes, patch)
2003-05-15 15:49 EDT, hjl
no flags Details | Diff

  None (edit)
Description hjl 2003-03-26 18:46:36 EST
# make
gcc -O -DGCC_BUG -c main.c
gcc -O -DGCC_BUG -fPIC -c shared.c
gcc -shared -o libfoo.so  shared.o
gcc -o foo  main.o libfoo.so -Wl,-rpath,.
for f in foo; do echo "Running: $f"; ./$f; \
  if [ $? != 0 ]; then echo Failed; fi; done
Running: foo
Data address: 0x8049924 != Data address from DSO: 0x400187e4
Function address: 0x80484c0 !=  Function address from DSO: 0x4001775f
Data: 100 != Data from DSO: 10
Failed

The testcase will always fail. But without -DGCC_BUG,

Function address: 0x80484c0 !=  Function address from DSO: 0x4001775f

won't be there.
Comment 1 hjl 2003-03-26 18:47:53 EST
Created attachment 90737 [details]
A testcase.
Comment 2 hjl 2003-05-15 15:49:47 EDT
Created attachment 91702 [details]
A patch to fix the problem.
Comment 3 Jakub Jelinek 2004-10-07 06:08:05 EDT
If you are convinced this is a bug, please push that upstream.
I don't know why addresses of variables should be handled differently
from function pointers and the code you're patching is certainly not there.

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