public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35483]  New: GCC on AIX doesn't support dollar in symbols name.
@ 2008-03-06 15:09 Laurent dot Vivier at bull dot net
  2008-03-06 15:15 ` [Bug c++/35483] " Laurent dot Vivier at bull dot net
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Laurent dot Vivier at bull dot net @ 2008-03-06 15:09 UTC (permalink / raw)
  To: gcc-bugs

When compiling libjava on AIX 6.1, gcc generates to the assembler symbols with
dollar inside.
But IBM "as" is not able to manage dollar in symbol names, so the compilation
fails.


-- 
           Summary: GCC on AIX doesn't support dollar in symbols name.
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Laurent dot Vivier at bull dot net
  GCC host triplet: powerpc-ibm-aix6.1.0.0


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


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

* [Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
  2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
@ 2008-03-06 15:15 ` Laurent dot Vivier at bull dot net
  2008-03-11 15:29 ` Laurent dot Vivier at bull dot net
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent dot Vivier at bull dot net @ 2008-03-06 15:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from Laurent dot Vivier at bull dot net  2008-03-06 15:14 -------
Created an attachment (id=15273)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15273&action=view)
This patch learns to gcc how to use IBM as with symbols with dollar inside.

This patch removes '$' from symbol names and replace them by "_".
It emits ".rename" pseudo-op to keep the good symbol name in the symbol table.

See
http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.aixassem/doc/alangref/rename.htm


-- 


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


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

* [Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
  2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
  2008-03-06 15:15 ` [Bug c++/35483] " Laurent dot Vivier at bull dot net
@ 2008-03-11 15:29 ` Laurent dot Vivier at bull dot net
  2008-05-05  5:55 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent dot Vivier at bull dot net @ 2008-03-11 15:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from Laurent dot Vivier at bull dot net  2008-03-11 15:28 -------
Created an attachment (id=15298)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15298&action=view)
new version of previous patch (aix-asm.patch)

correctly export symbols
Add compatibility with libtool processing
correctly import them
remove asm part specific to libjava


-- 


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


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

* [Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
  2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
  2008-03-06 15:15 ` [Bug c++/35483] " Laurent dot Vivier at bull dot net
  2008-03-11 15:29 ` Laurent dot Vivier at bull dot net
@ 2008-05-05  5:55 ` pinskia at gcc dot gnu dot org
  2008-07-11 21:55 ` dje at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-05-05  5:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-05-05 05:54 -------
I don't think this is a real bug.  Also patches should be off of the trunk and
submitted to gcc-patches@gcc.gnu.org.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   GCC host triplet|powerpc-ibm-aix6.1.0.0      |
 GCC target triplet|                            |powerpc-ibm-aix6.1.0.0


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


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

* [Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
  2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
                   ` (2 preceding siblings ...)
  2008-05-05  5:55 ` pinskia at gcc dot gnu dot org
@ 2008-07-11 21:55 ` dje at gcc dot gnu dot org
  2008-10-02 20:48 ` dje at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2008-07-11 21:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dje at gcc dot gnu dot org  2008-07-11 21:54 -------
Yes, this will substitute "_" for "$", but most programs do not use dollar
signs in symbol names, except Java.  GNU Java is not supported on AIX, so
building libjava does not accomplish much.

This is a large patch and requires an assignment.  With an assignment, I can
consider it.


-- 

dje at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dje at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-07-11 21:54:53
               date|                            |


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


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

* [Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
  2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
                   ` (3 preceding siblings ...)
  2008-07-11 21:55 ` dje at gcc dot gnu dot org
@ 2008-10-02 20:48 ` dje at gcc dot gnu dot org
  2008-10-02 21:31 ` dje at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2008-10-02 20:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dje at gcc dot gnu dot org  2008-10-02 20:47 -------
This patch causes G++ to crash building some applications on AIX.  Apparently a
version of G++ including this patch is being distributed and users are
reporting problems.


-- 


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


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

* [Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
  2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
                   ` (4 preceding siblings ...)
  2008-10-02 20:48 ` dje at gcc dot gnu dot org
@ 2008-10-02 21:31 ` dje at gcc dot gnu dot org
  2008-10-14 17:08 ` dje at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2008-10-02 21:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dje at gcc dot gnu dot org  2008-10-02 21:30 -------
+  strip = (char *)ggc_alloc_string (name, len);
+
+  for (len = 0; name[len]; len++)
+    if (name[len] == '$')
+      strip[len] = '_';
+    else
+      strip[len] = name[len];
+  strip[len] = 0;
+
+  return strip;

It is not safe to edit a ggc_alloc_string-allocated string in place.  This
should be

+  strip = (char *)alloca (name, len);
...
+  return ggc_alloc_string  (strip, len);

Also, using fixed-size 256 byte buffers is not safe because they can overflow.


-- 


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


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

* [Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
  2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
                   ` (5 preceding siblings ...)
  2008-10-02 21:31 ` dje at gcc dot gnu dot org
@ 2008-10-14 17:08 ` dje at gcc dot gnu dot org
  2008-10-15 12:26 ` dje at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2008-10-14 17:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dje at gcc dot gnu dot org  2008-10-14 17:06 -------
Created an attachment (id=16493)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16493&action=view)
patch to convert dollar signs to underscores

New patch.  This patch intercepts the dollar signs at a lower level and
correctly handles garbage collection allocations of strings.


-- 

dje at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #15273|0                           |1
        is obsolete|                            |
  Attachment #15298|0                           |1
        is obsolete|                            |


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


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

* [Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
  2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
                   ` (6 preceding siblings ...)
  2008-10-14 17:08 ` dje at gcc dot gnu dot org
@ 2008-10-15 12:26 ` dje at gcc dot gnu dot org
  2008-10-15 16:56 ` dje at gcc dot gnu dot org
  2008-10-16 11:59 ` dje at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2008-10-15 12:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dje at gcc dot gnu dot org  2008-10-15 12:25 -------
Subject: Bug 35483

Author: dje
Date: Wed Oct 15 12:23:55 2008
New Revision: 141134

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141134
Log:
        PR target/35483
        Based on patches by Laurent Vivier.
        * xcoffout.h (DBX_FINISH_STABS): Translate dollar sign to underscore.
        * config/rs6000/rs6000-protos.h (rs6000_xcoff_strip_dollar): Declare.
        * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Translate
        dollar sign to underscore.
        (ASM_OUTPUT_EXTERNAL): Same.
        (ASM_OUTPUT_LABELREF): New.
        * config/rs6000/rs6000.c (rs6000_xcoff_strip_dollar): New.

        * config/rs6000/aix51.h (TARGET_USE_JCR_SECTION): Define.
        * config/rs6000/aix52.h (TARGET_USE_JCR_SECTION): Define.
        * config/rs6000/aix53.h (TARGET_USE_JCR_SECTION): Define.
        * config/rs6000/aix61.h (TARGET_USE_JCR_SECTION): Define.

Modified:
    trunk/gcc/config/rs6000/aix51.h
    trunk/gcc/config/rs6000/aix52.h
    trunk/gcc/config/rs6000/aix53.h
    trunk/gcc/config/rs6000/aix61.h
    trunk/gcc/config/rs6000/rs6000-protos.h
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/config/rs6000/xcoff.h
    trunk/gcc/xcoffout.h


-- 


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


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

* [Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
  2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
                   ` (7 preceding siblings ...)
  2008-10-15 12:26 ` dje at gcc dot gnu dot org
@ 2008-10-15 16:56 ` dje at gcc dot gnu dot org
  2008-10-16 11:59 ` dje at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2008-10-15 16:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dje at gcc dot gnu dot org  2008-10-15 16:55 -------
Patch committed.


-- 

dje at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.0


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


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

* [Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
  2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
                   ` (8 preceding siblings ...)
  2008-10-15 16:56 ` dje at gcc dot gnu dot org
@ 2008-10-16 11:59 ` dje at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2008-10-16 11:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dje at gcc dot gnu dot org  2008-10-16 11:58 -------
Subject: Bug 35483

Author: dje
Date: Thu Oct 16 11:57:26 2008
New Revision: 141170

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141170
Log:
gcc/
        PR target/35483
        * Makefile.in (coverage.o): Depend on $(TM_P_H).
        * coverage.c: Include tm_p.h.
        * config/rs6000/x-aix (jc1): Override LDFLAGS.
        * config/rs6000/xcoff.h (ASM_GENERATE_INTERNAL_LABEL): Strip
        dollar signs from PREFIX.
        * config/rs6000/rs6000.c (output_toc): Use RS6000_OUTPUT_BASENAME
        instead of manual strip_name_encoding.

java/
        PR target/35483
        * Make-lang.in (class.o): Depend on $(TM_P_H).
        (expr.o): Same.
        * class.c: Include tm_p.h.
        * expr.c: Include tm_p.h.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/config/rs6000/x-aix
    trunk/gcc/config/rs6000/xcoff.h
    trunk/gcc/coverage.c
    trunk/gcc/java/ChangeLog
    trunk/gcc/java/Make-lang.in
    trunk/gcc/java/class.c
    trunk/gcc/java/expr.c


-- 


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


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

end of thread, other threads:[~2008-10-16 11:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-06 15:09 [Bug c++/35483] New: GCC on AIX doesn't support dollar in symbols name Laurent dot Vivier at bull dot net
2008-03-06 15:15 ` [Bug c++/35483] " Laurent dot Vivier at bull dot net
2008-03-11 15:29 ` Laurent dot Vivier at bull dot net
2008-05-05  5:55 ` pinskia at gcc dot gnu dot org
2008-07-11 21:55 ` dje at gcc dot gnu dot org
2008-10-02 20:48 ` dje at gcc dot gnu dot org
2008-10-02 21:31 ` dje at gcc dot gnu dot org
2008-10-14 17:08 ` dje at gcc dot gnu dot org
2008-10-15 12:26 ` dje at gcc dot gnu dot org
2008-10-15 16:56 ` dje at gcc dot gnu dot org
2008-10-16 11:59 ` dje 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).