This is the mail archive of the gcc-help@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]

link 32bit .o with 64bit .o



On x86 platform, ?is there any means to link 32 bit ELF output into?64 bit ??
In Linux kernel, ?arch/x86/boot/compressed/head_64.S, ? starts from32-bit code?and enables CPU to jump into 64-bit. ?So, that file is?assembled?into 64 bit ELF?object with mixed 32/64 bit code.
Now, I want to call a routine from somewhere in the 32bit code part?of head_64.S. ? ?And I write the routine by C language, ?say test.c?and compile ?it with "gcc -m32 -c -o test.o". ? ?How can I link mytest.o to head_64.o ? ?Or I have to use assembly language to rewritemy routine and embed it directly into head_64.S source code ?
please reply me directly
thanks,-minskey
 		 	   		  


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