getconf在x86_64架构上返回32位

时间:2013-12-16 07:50:21

标签: linux x86-64

在我的一个系统中,我观察了下面的输出。

root@base0-0-0-1-0-11-1:/root> uname -a
Linux base0-0-0-1-0-11-1 2.6.34.12-kairos-ksc-dec02-1800 #2 SMP Mon Dec 2 17:48:50 IST 2013 x86_64 x86_64 x86_64 GNU/Linux
root@base0-0-0-1-0-11-1:/root> getconf LONG_BIT
32
root@base0-0-0-1-0-11-1:/root>

uname的输出表示系统为64位,而getconf表示其为32位。这种不匹配有什么理由吗? 我在其他系统中确认没有发现这种不匹配。

请建议。感谢。

1 个答案:

答案 0 :(得分:1)

您可以通过getconf运行来确认哪些文件strace正在上传。

$ strace getconf LONG_BIT

实施例

从我的64位Fedora 19安装。

$ strace getconf LONG_BIT
execve("/usr/bin/getconf", ["getconf", "LONG_BIT"], [/* 92 vars */]) = 0
brk(0)                                  = 0x1114000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b865b9000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=190823, ...}) = 0
mmap(NULL, 190823, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8b8658a000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\242\213?\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2108632, ...}) = 0
mmap(0x3f8ba00000, 3932768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3f8ba00000
mprotect(0x3f8bbb6000, 2097152, PROT_NONE) = 0
mmap(0x3f8bdb6000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x3f8bdb6000
mmap(0x3f8bdbc000, 16992, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3f8bdbc000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b86589000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b86587000
arch_prctl(ARCH_SET_FS, 0x7f8b86587740) = 0
mprotect(0x604000, 4096, PROT_READ)     = 0
mprotect(0x3f8bdb6000, 16384, PROT_READ) = 0
mprotect(0x3f8b820000, 4096, PROT_READ) = 0
munmap(0x7f8b8658a000, 190823)          = 0
brk(0)                                  = 0x1114000
brk(0x1135000)                          = 0x1135000
brk(0)                                  = 0x1135000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=106055264, ...}) = 0
mmap(NULL, 106055264, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8b80062000
close(3)                                = 0
readlink("/usr/libexec/getconf/default", "POSIX_V6_LP64_OFF64", 21) = 19
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 4), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b865b8000
write(1, "64\n", 364
)                     = 3
exit_group(0)                           = ?
+++ exited with 0 +++