我有一个elf文件,我通过键入nm -n elf.elf来执行nm操作,并在两台不同的机器上获得以下输出:
Fedora的
80900114 t $LFB2.testmod1
80900114 t $LFE2.main
80900114 t $LSM0.testmod1
80900114 t $LSM1.testmod1
80900114 t $LX2.testmod1
80900114 t $Letext0.main
80900114 t $Ltext0.testmod1
80900114 T _testmod1
locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
Ubuntu的
80900114 t $Letext0.main
80900114 t $LFB2.testmod1
80900114 t $LFE2.main
80900114 t $LSM0.testmod1
80900114 t $LSM1.testmod1
80900114 t $Ltext0.testmod1
80900114 t $LX2.testmod1
80900114 T _testmod1
locale
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
我在两台机器上都显示了一小部分输出,我检查了区域设置,它们看起来完全相同,是什么会导致输出在这两台机器上的顺序不同?
字母数字排序在两台机器上也提供不同的顺序,为什么会这样?
(注意:nm版本不同但我不希望排序的行为特定于版本..)