public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14141] New: static functions incorrectly generate multiple function descriptors
@ 2004-02-13 15:12 jejb at steeleye dot com
2004-02-13 15:14 ` [Bug c/14141] " jejb at steeleye dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jejb at steeleye dot com @ 2004-02-13 15:12 UTC (permalink / raw)
To: gcc-bugs
the 64 bit compiler is only used to generate kernels for linux (the particular
kernel I debugged this on is 2.6.3-rc1-pa2) so I don't have a user level
compileable example.
The problem arises because a particular piece of code in mm/shmap.c has a
function pointer comparison:
if (inode->i_op->truncate == shmem_truncate)
Which is always evaluating false. (shmem_truncate is a static function in shmem.c)
When I check, the Elf64_Fptr for each is different, but the address of the
function is the same. hppa64 is supposed to have the OPD rule where there's
only one function descriptor per function, so we can evaluate this comparison by
comparing the addresses of the function descriptors.
The value of the function descriptor is assigned like this later in the same file:
static struct inode_operations shmem_symlink_inode_operations = {
.truncate = shmem_truncate,
.readlink = shmem_readlink,
.follow_link = shmem_follow_link,
};
As a test, if the function shmem_truncate is made unstatic, the comparison does
work successfully.
--
Summary: static functions incorrectly generate multiple function
descriptors
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jejb at steeleye dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: hppa-linux
GCC host triplet: hppa-linux
GCC target triplet: hppa64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14141
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/14141] static functions incorrectly generate multiple function descriptors
2004-02-13 15:12 [Bug c/14141] New: static functions incorrectly generate multiple function descriptors jejb at steeleye dot com
@ 2004-02-13 15:14 ` jejb at steeleye dot com
2004-02-13 15:30 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jejb at steeleye dot com @ 2004-02-13 15:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jejb at steeleye dot com 2004-02-13 15:14 -------
Created an attachment (id=5748)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5748&action=view)
The full shmem.c file from kernel 2.6.3-rc1-pa2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14141
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/14141] static functions incorrectly generate multiple function descriptors
2004-02-13 15:12 [Bug c/14141] New: static functions incorrectly generate multiple function descriptors jejb at steeleye dot com
2004-02-13 15:14 ` [Bug c/14141] " jejb at steeleye dot com
@ 2004-02-13 15:30 ` pinskia at gcc dot gnu dot org
2004-02-13 15:52 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-13 15:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-13 15:30 -------
This is a dup of bug 11197, the problem is partly an ABI problem and partly GCC not expanding the
funtion comparision.
*** This bug has been marked as a duplicate of 11197 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14141
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/14141] static functions incorrectly generate multiple function descriptors
2004-02-13 15:12 [Bug c/14141] New: static functions incorrectly generate multiple function descriptors jejb at steeleye dot com
2004-02-13 15:14 ` [Bug c/14141] " jejb at steeleye dot com
2004-02-13 15:30 ` pinskia at gcc dot gnu dot org
@ 2004-02-13 15:52 ` pinskia at gcc dot gnu dot org
2004-02-15 16:05 ` gmsoft at tuxicoman dot be
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-13 15:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-13 15:52 -------
Reopening for now.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
Status|RESOLVED |UNCONFIRMED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14141
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/14141] static functions incorrectly generate multiple function descriptors
2004-02-13 15:12 [Bug c/14141] New: static functions incorrectly generate multiple function descriptors jejb at steeleye dot com
` (2 preceding siblings ...)
2004-02-13 15:52 ` pinskia at gcc dot gnu dot org
@ 2004-02-15 16:05 ` gmsoft at tuxicoman dot be
2004-02-16 18:06 ` soete dot joel at tiscali dot be
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: gmsoft at tuxicoman dot be @ 2004-02-15 16:05 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |gmsoft at tuxicoman dot be
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14141
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/14141] static functions incorrectly generate multiple function descriptors
2004-02-13 15:12 [Bug c/14141] New: static functions incorrectly generate multiple function descriptors jejb at steeleye dot com
` (3 preceding siblings ...)
2004-02-15 16:05 ` gmsoft at tuxicoman dot be
@ 2004-02-16 18:06 ` soete dot joel at tiscali dot be
2004-03-14 1:25 ` danglin at gcc dot gnu dot org
2004-03-14 1:34 ` danglin at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: soete dot joel at tiscali dot be @ 2004-02-16 18:06 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |soete dot joel at tiscali
| |dot be
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14141
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/14141] static functions incorrectly generate multiple function descriptors
2004-02-13 15:12 [Bug c/14141] New: static functions incorrectly generate multiple function descriptors jejb at steeleye dot com
` (4 preceding siblings ...)
2004-02-16 18:06 ` soete dot joel at tiscali dot be
@ 2004-03-14 1:25 ` danglin at gcc dot gnu dot org
2004-03-14 1:34 ` danglin at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2004-03-14 1:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From danglin at gcc dot gnu dot org 2004-03-14 01:25 -------
Created an attachment (id=5912)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5912&action=view)
Small test program that generates plabel field selectors for function foo in
different sections
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14141
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/14141] static functions incorrectly generate multiple function descriptors
2004-02-13 15:12 [Bug c/14141] New: static functions incorrectly generate multiple function descriptors jejb at steeleye dot com
` (5 preceding siblings ...)
2004-03-14 1:25 ` danglin at gcc dot gnu dot org
@ 2004-03-14 1:34 ` danglin at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2004-03-14 1:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From danglin at gcc dot gnu dot org 2004-03-14 01:34 -------
I can duplicate the problem with the test program attached in fptr.tgz
using GNU ld on hppa64-hp-hpux11.11. However, the problem doesn't occur
with the HP linker. Given that hppa64 elf ports support named data sections,
we can't fix this in GCC. This is a GNU ld bug. Thus, I am marking
this PR as invalid.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dave at hiauly1 dot hia dot
| |nrc dot ca
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14141
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-03-14 1:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-13 15:12 [Bug c/14141] New: static functions incorrectly generate multiple function descriptors jejb at steeleye dot com
2004-02-13 15:14 ` [Bug c/14141] " jejb at steeleye dot com
2004-02-13 15:30 ` pinskia at gcc dot gnu dot org
2004-02-13 15:52 ` pinskia at gcc dot gnu dot org
2004-02-15 16:05 ` gmsoft at tuxicoman dot be
2004-02-16 18:06 ` soete dot joel at tiscali dot be
2004-03-14 1:25 ` danglin at gcc dot gnu dot org
2004-03-14 1:34 ` danglin at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).