This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Translate dollar signs to underscores for AIX (PR target/35483)


The AIX XCOFF assembler does not allow dollar signs in symbols --
dollar signs have a special
meaning as the current location.  Java requires dollar signs in symbols.

This patch is a revised and rewritten version of the original patch in
the Bugzilla PR.  It defines
ASM_OUTPUT_LABELREF, used by varasm.c:assemble_name(), to translate dollar signs
to underscores.  ASM_DECLARE_FUNCTION_NAME and ASM_OUTPUT_EXTERNAL also
perform the same translation and use the rename pseudo-op to export
the original name
with dollar sign.

Bootstrapped and regression tested on powerpc-ibm-aix5.3.0.0.

Any comments / suggestions about the implementation?

Thanks, David

        PR target/35483
        * 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.

Attachment: dollar-in-label-patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]