public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/29943]  New: gcc generate incorrect alias symbols for PPC
@ 2006-11-22 16:40 raj dot khem at gmail dot com
  2006-11-22 22:21 ` [Bug target/29943] [4.2 Regression] " amodra at bigpond dot net dot au
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: raj dot khem at gmail dot com @ 2006-11-22 16:40 UTC (permalink / raw)
  To: gcc-bugs

The following example(reduced from glibc) compiles differently for ppc target
when using gcc 4.2 as compared to gcc 4.1
It generates the alias symbol as a real symbol instead of creating it as alias.
I get this correct using gcc 4.2 for arm so the problem seems to be affecting
only ppc. This also works ok with gcc 4.1

to reproduce compile the example with -O2

testcase.c
========================================================
extern char **_dl_argv

     __attribute__ ((section (".data.rel.ro")))

     ;

extern char **_dl_argv_internal __attribute__ ((visibility ("hidden")))

     __attribute__ ((section (".data.rel.ro")))

     ;
char **_dl_argv __attribute__ ((section (".data.rel.ro"))) = ((void *)0);
extern __typeof (_dl_argv) _dl_argv_internal __attribute__ ((alias
("_dl_argv")));
char* foo (){
   return _dl_argv_internal[0];
}

=====================================

glibc segfaults in ld.so currently when compiled with gcc 4.2 for ppc due to
this issue.


-- 
           Summary: gcc generate incorrect alias symbols for PPC
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: raj dot khem at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: powerpc-*-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29943


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2007-02-20  1:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-22 16:40 [Bug target/29943] New: gcc generate incorrect alias symbols for PPC raj dot khem at gmail dot com
2006-11-22 22:21 ` [Bug target/29943] [4.2 Regression] " amodra at bigpond dot net dot au
2006-11-22 22:27 ` [Bug target/29943] [4.2/4.3 " amodra at bigpond dot net dot au
2006-11-22 22:31 ` pinskia at gcc dot gnu dot org
2006-11-22 22:41 ` amodra at bigpond dot net dot au
2006-11-23  2:13 ` amodra at bigpond dot net dot au
2006-11-23  2:31 ` dje at gcc dot gnu dot org
2006-11-23  5:05 ` richard at codesourcery dot com
2006-11-23  8:01 ` amodra at bigpond dot net dot au
2006-11-23 12:45 ` patchapp at dberlin dot org
2006-11-23 20:26 ` amodra at bigpond dot net dot au
2007-01-15 13:38 ` [Bug middle-end/29943] " schwab at suse dot de
2007-01-21 21:47 ` pinskia at gcc dot gnu dot org
2007-02-14 20:25 ` arekm at pld-linux dot org
2007-02-19 20:45 ` mmitchel at gcc dot gnu dot org
2007-02-20  1:26 ` amodra at gcc dot gnu dot org
2007-02-20  1:28 ` amodra at gcc dot gnu dot org
2007-02-20  1:29 ` amodra at bigpond dot net dot au
2007-02-20  1:29 ` amodra at bigpond dot net dot au

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).