This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: libio vs. mangling
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: libio vs. mangling
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sun, 4 Jun 2000 14:30:19 -0700
- Reply-to: mark at codesourcery dot com
Since libio contains mangled names, it needs to change to accomodate
the new mangling. (Of course, it still doesn't work with the new ABI,
but this helps us keep limping along.)
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
2000-06-04 Mark Mitchell <mark@codesourcery.com>
* libioP.h: Handle new ABI mangling.
* stdstrbufs.cc: Likewise.
Index: libioP.h
===================================================================
RCS file: /cvs/gcc/egcs/libio/libioP.h,v
retrieving revision 1.12
diff -c -p -r1.12 libioP.h
*** libioP.h 1999/12/22 09:01:59 1.12
--- libioP.h 2000/06/04 21:14:29
*************** extern int _IO_vscanf __P ((const char *
*** 593,605 ****
/* VTABLE_LABEL defines NAME as of the CLASS class.
CNLENGTH is strlen(#CLASS). */
#ifdef __GNUC__
! # if _G_VTABLE_LABEL_HAS_LENGTH
! # define VTABLE_LABEL(NAME, CLASS, CNLENGTH) \
extern char NAME[] asm (_G_VTABLE_LABEL_PREFIX #CNLENGTH #CLASS);
# else
# define VTABLE_LABEL(NAME, CLASS, CNLENGTH) \
! extern char NAME[] asm (_G_VTABLE_LABEL_PREFIX #CLASS);
! # endif
#endif /* __GNUC__ */
#if !defined(builtinbuf_vtable) && defined(__cplusplus)
--- 593,610 ----
/* VTABLE_LABEL defines NAME as of the CLASS class.
CNLENGTH is strlen(#CLASS). */
#ifdef __GNUC__
! # if (!defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100)
! # if _G_VTABLE_LABEL_HAS_LENGTH
! # define VTABLE_LABEL(NAME, CLASS, CNLENGTH) \
extern char NAME[] asm (_G_VTABLE_LABEL_PREFIX #CNLENGTH #CLASS);
+ # else
+ # define VTABLE_LABEL(NAME, CLASS, CNLENGTH) \
+ extern char NAME[] asm (_G_VTABLE_LABEL_PREFIX #CLASS);
+ # endif
# else
# define VTABLE_LABEL(NAME, CLASS, CNLENGTH) \
! extern char NAME[] asm ("_ZN" #CNLENGTH #CLASS "TVE");
! # endif /* (!defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100) */
#endif /* __GNUC__ */
#if !defined(builtinbuf_vtable) && defined(__cplusplus)
Index: stdstrbufs.cc
===================================================================
RCS file: /cvs/gcc/egcs/libio/stdstrbufs.cc,v
retrieving revision 1.3
diff -c -p -r1.3 stdstrbufs.cc
*** stdstrbufs.cc 1997/11/18 16:53:45 1.3
--- stdstrbufs.cc 2000/06/04 21:14:29
*************** the executable file might be covered by
*** 35,45 ****
--- 35,49 ----
#if !defined(filebuf_vtable) && defined(__cplusplus)
#ifdef __GNUC__
extern char filebuf_vtable[]
+ #if (!defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100)
asm (_G_VTABLE_LABEL_PREFIX
#if _G_VTABLE_LABEL_HAS_LENGTH
"7"
#endif
"filebuf");
+ #else
+ asm ( "_ZN7filebufTVE" );
+ #endif /* (!defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100) */
#else /* !__GNUC__ */
#if _G_VTABLE_LABEL_HAS_LENGTH
#define filebuf_vtable _G_VTABLE_LABEL_PREFIX_ID##7filebuf
*************** struct _IO_fake_stdiobuf {
*** 87,97 ****
--- 91,105 ----
#ifndef stdiobuf_vtable
#ifdef __GNUC__
extern struct _IO_jump_t stdiobuf_vtable
+ #if (!defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100)
asm (_G_VTABLE_LABEL_PREFIX
#if _G_VTABLE_LABEL_HAS_LENGTH
"8"
#endif
"stdiobuf");
+ #else
+ asm ( "_ZN15stdiobuf_vtableTVE" );
+ #endif /* (!defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100) */
#else /* !__GNUC__ */
#if _G_VTABLE_LABEL_HAS_LENGTH
#define stdiobuf_vtable _G_VTABLE_LABEL_PREFIX_ID##8stdiobuf