This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


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

Re: Java symbol mangling


On Mon, 29 Jan 2001, Bryce McKinlay wrote:
>> /usr/ccs/bin/as: "/var/tmp/ccqA2t6Imain.s", line 35: error: symbol "_ZN3gnu3gcj7convert7Convert6class$E" is used but not defined
>> /usr/ccs/bin/as: "/var/tmp/ccqA2t6Imain.s": , approx line 35: internal error: evaluate_symbol_expression(): op 20?
>> gmake[3]: *** [jv-convert] Error 1
> What makes you think its a mangling problem?

Just my gut telling me that. ;-) Probably incorrectly, though.

> Does the symbol exist at all? Are there class$ symbols for other
> classes?

Please find below pre-processed source and assembly language for that
example:

-------- BytesToUnicodemain.i --------
extern const char **_Jv_Compiler_Properties;
static const char *props[] =
{
  0
};

extern int class __attribute__ ((alias ("_ZN3gnu3gcj7convert7Convert6class$E")));
int main (int argc, const char **argv)
{
   _Jv_Compiler_Properties = props;
   JvRunMain (&class, argc, argv);
}
-------- BytesToUnicodemain.s --------
	.file	"BytesToUnicodemain.i"
	.stabs	"/files/pfeifer/OBJ-0131-0213/sparc-sun-solaris2.8/libjava/",100,0,0,.LLtext0
	.stabs	"BytesToUnicodemain.i",100,0,0,.LLtext0
	.section	".text"
.LLtext0:
	.stabs	"gcc2_compiled.", 0x3c, 0, 0, 0
	.stabs	"int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0
	.stabs	"char:t(0,2)=r(0,2);0;127;",128,0,0,0
	.stabs	"long int:t(0,3)=r(0,3);-2147483648;2147483647;",128,0,0,0
	.stabs	"unsigned int:t(0,4)=r(0,4);0000000000000;0037777777777;",128,0,0,0
	.stabs	"long unsigned int:t(0,5)=r(0,5);0000000000000;0037777777777;",128,0,0,0
	.stabs	"long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0,0
	.stabs	"long long unsigned int:t(0,7)=@s64;r(0,7);0000000000000;01777777777777777777777;",128,0,0,0
	.stabs	"short int:t(0,8)=@s16;r(0,8);-32768;32767;",128,0,0,0
	.stabs	"short unsigned int:t(0,9)=@s16;r(0,9);0;65535;",128,0,0,0
	.stabs	"signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0
	.stabs	"unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
	.stabs	"float:t(0,12)=r(0,1);4;0;",128,0,0,0
	.stabs	"double:t(0,13)=r(0,1);8;0;",128,0,0,0
	.stabs	"long double:t(0,14)=r(0,1);16;0;",128,0,0,0
	.stabs	"complex int:t(0,15)=s8real:(0,1),0,32;imag:(0,1),32,32;;",128,0,0,0
	.stabs	"complex float:t(0,16)=r(0,16);8;0;",128,0,0,0
	.stabs	"complex double:t(0,17)=r(0,17);16;0;",128,0,0,0
	.stabs	"complex long double:t(0,18)=r(0,18);32;0;",128,0,0,0
	.stabs	"__builtin_va_list:t(0,19)=*(0,20)=(0,20)",128,0,0,0
	.stabs	"_Bool:t(0,21)=@s8;-16;",128,0,0,0
	.section	".data"
	.stabs	"props:S(0,22)=ar(0,23)=r(0,23);0000000000000;0037777777777;;0;0;(0,24)=*(0,2)",38,0,2,props
	.align 4
	.type	props,#object
	.size	props,4
props:
	.uaword	0
	.global class
	class = _ZN3gnu3gcj7convert7Convert6class$E
	.section	".text"
	.align 4
	.stabs	"main:F(0,1)",36,0,9,main
	.stabs	"argc:p(0,1)",160,0,8,68
	.stabs	"argv:p(0,25)=*(0,24)",160,0,8,72
	.global main
	.type	main,#function
	.proc	04
main:
	.stabn 68,0,9,.LLM1-main
.LLM1:
	!#PROLOGUE# 0
	save	%sp, -112, %sp
	!#PROLOGUE# 1
	st	%i0, [%fp+68]
	st	%i1, [%fp+72]
.LLBB2:
	.stabn 68,0,10,.LLM2-main
.LLM2:
	sethi	%hi(props), %o0
	or	%o0, %lo(props), %o1
	sethi	%hi(_Jv_Compiler_Properties), %o0
	st	%o1, [%o0+%lo(_Jv_Compiler_Properties)]
	.stabn 68,0,11,.LLM3-main
.LLM3:
	sethi	%hi(class), %o0
	or	%o0, %lo(class), %o0
	ld	[%fp+68], %o1
	ld	[%fp+72], %o2
	call	JvRunMain, 0
	 nop
.LLBE2:
	.stabn 68,0,12,.LLM4-main
.LLM4:
	ret
	restore
.LLfe1:
	.size	main,.LLfe1-main
.LLscope0:
	.stabs	"",36,0,0,.LLscope0-main
	.text
	.stabs "",100,0,0,Letext
Letext:
	.ident	"GCC: (GNU) 2.97 20010130 (experimental)"
-------- end --------

The lines causing problems is class = _ZN3gnu3gcj7convert7Convert6class$E.

Perhaps this is just a GNU-as-ism?

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/


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