Monday, November 01, 2004

Solaris 10 x86 64-bit AMD64: My 64-bit "Hello World" on AMD64


Recently I just installed the latest build of Solaris 10 x86 build 70 (soon will be available on Solaris Express). The installation went fine without any problem. Few things that I found after upgrading my V40z are as follows:


  • It still boots 32-bit kernel by default

  • It is now using Xorg instead of Xsun

  • Boot version is now 4.00 (+amd64)



(Using xorgconf wasn't easy since I am used to the autoprobing nature of kdmconfig)


Anyway I rebooted, pressed ESCape to enter the CDA screen and modified my boot properties as follows
default boot-file kernel/amd64/unix instead of kernel/unix


Voila now I am running my V40z finally with a 64-bit Solaris 10 kernel


I also did a quick test of building a "Hello World" Program using the early access Sun Studio 10 compiler for Solaris 10 x86.



# cat >> test.c
# include < stdio.h>
void main()
{
printf("Hello World\n");
}


# cc test.c
# file a.out
a.out: ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped
# ./a.out
Hello World
# cc -xarch=amd64 test.c
# file a.out
a.out: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped
# ./a.out
Hello World
#




Solaris 10 64-bit on AMD64 is finally here


No comments: