关于isainfo查看cpu位数是32或64的疑问

关于isainfo查看cpu位数是32或64的疑问?大家知道用isainfo -b可以查看内核位数。
在solaris上执行命令显示如下:
# isainfo -b
64
然后用psrinfo查看cpu信息。
# psrinfo -v
Status of processor 0 as of: 10/18/07 19:56:15
Processor has been on-line since 10/08/07 10:02:44.
The sparcv9 processor operates at 440 MHz,
and has a sparcv9 floating point processor.
从isainfo -b 看内核是64位,CPU 为SPARC V9,从《solaris内核结构》中知道64位SPARC V9 二进制代码的ABI规定栈是不可以执行的。
但是pmap命令显示结果如下:
# pmap -x 24621
24621:SAU_CSC_TST
Address Kbytes Resident Shared Private Permissions Mapped File
00010000 848 376 - 376 read/exec SAU_CSC_TST
000F2000 32 32 - 32 read/write/exec SAU_CSC_TST
000FA000 21576 21576 - 21576 read/write/exec [ heap ]
-----------------------------------------------------
FE50C000 8 8 - 8 read/write/exec [ anon ]
FE608000 16 16 - 16 read/write/exec [ anon ]
FE60E000 8 8 - 8 read/write/exec [ anon ]
FE70C000 8 8 - 8 read/write/exec [ anon ]
FE710000 8 8 - 8 read/write/exec [ anon ]
FE80E000 8 8 - 8 read/write/exec [ anon ]
FE9E4000 8 8 - 8 read/write/exec [ anon ]
FE9F4000 8 8 - 8 read/write/exec [ anon ]
FEA00000 120 120 112 8 read/exec libthread.so.1
FEA2E000 8 8 - 8 read/write/exec libthread.so.1
FEA30000 48 40 - 40 read/write/exec libthread.so.1
FEA40000 16 16 8 8 read/exec libmp.so.2
FEA54000 8 8 - 8 read/write/exec libmp.so.2
--------------------------
FEB68000 8 8 - 8 read/write/exec libCrun.so.1
FEB6A000 16 - - - read/write/exec libCrun.so.1
FEB80000 672 672 664 8 read/exec libc.so.1
FEC38000 32 32 - 32 read/write/exec libc.so.1
FEC50000 168 120 88 32 read/exec libcurses.so.1
FEC8A000 32 32 8 24 read/write/exec libcurses.so.1
FEC92000 8 - - - read/write/exec libcurses.so.1
FECA0000 216 216 - 216 read/exec dev:136,7 ino:253198
FECE4000 80 24 - 24 read/write/exec dev:136,7 ino:253198
-----------------------------------------
FED64000 88 40 - 40 read/write/exec [ anon ]
FED80000 552 400 - 400 read/exec dev:136, 伊丽莎白雅顿 7 ino:253193
FEE18000 200 48 - 48 read/write/exec dev:136,7 ino:253193

FF378000 16 16 - 16 read/write/exec dev:136,7 ino:253196
FF37C000 8 8 - 8 read/write/exec [ anon ]
FF390000 8 8 - 8 read/exec libw.so.1
FF3A0000 8 8 - 8 read/write/exec [ anon ]
FF3B0000 136 136 128 8 read/exec ld.so.1
FF3E2000 8 8 - 8 read/write/exec ld.so.1
FFBEC000 16 16 - 16 read/write/exec [ stack ]
--------------------------------
total Kb 30440 26544 1656 24888

疑问1:如果从isainfo命令显示结果判断cpu是64位的为什么pmap显示的地址空间都是32位呢?(00010000)
疑问2:如果cpu是64位的sparc v9,那么【stack】的模式应该是不可执行的。而pmap显示的结果是如下:
FFBEC000 16 16 - 16 read/write/exec [ stack ]
【stack】可执行。
疑问3:如果不能用isa

安装完操作系统后,系统无法启动

info看cpu位数信息,那么solaris下有什么命令可以看?
疑问4:内核位数不等于cpu位数吗?
希望高手解答,谢谢!file /usr/bin/ls,就知道了
内核和操作系统支持64位并不等于全部都是32位的应用。
具体的可以参考《Solaris(64 位)开发者指南>>那本术你先用 file YourProgramFile 测试你的程序
如最简单的helloWorld程序,编译为32位和64位,其大小是略有差别的。
wuqingping@t1000 ~/testpro]$ls -l hello32 hello64
-rwxr-xr-x 1 wuqingping 5095 7144 May5 07:48 hello32
-rwxr-xr-x 1 wuqingping 5095 7592 May5 07:48 hello64

再用 file 命令确认文件的版本。
wuqingping@t1000 ~/testpro]$file hello32
hello32: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped

wuqingping@t1000 ~/testpro]$file hello64
hello64: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped谢谢楼上两位的回答,你们的答案好像是回答如何看应用程序是否是32位的了。但是如何看cpu的位数信息呢?
是否isainfo命令,显示的是内核可以支持的最高位数?目前SUN的CPU都是64位的,32位的停产快10年了学习中 <!--
我正在玩搜狐微博,快来“关注”我,了解我的最新动态吧。 "+userLink+""; $('miniAd').show(); } }, onFailure: function(){} }}); } showMiniAd();

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26690043/viewspace-719090/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26690043/viewspace-719090/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值