原帖由 寂寞烈火 于 2007-7-25 16:57 发表
提示什么信息吗?
/home/lee/test#cp /bin/ls .
/home/lee/test#file ./ls
./ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs ...
原帖由 deng_save_file 于 2007-7-26 13:27 发表
你这样是可以的。因为你的 exec 命令执行的 ls 仍然是 /bin/ls 而不是该 ls
下面是我的测试方案,你可以试试 :
mkdir 1
cd 1
cp /bin/ls .
chmod a-x ls
mkisofs -l -J -joliet-long -allow-leadi ...
$ /lib/ld-linux.so.2 <path_to_the_ELF_file>
The programs ld.so and ld-linux.so* find and load the shared libraries
needed by a program, prepare the program to run, and then run it.
原帖由 deng_save_file 于 2007-8-8 19:44 发表
仍然不行:
/lib/ld-linux.so.2 ./ls
./ls: error while loading shared libraries: ./ls: wrong ELF class: ELFCLASS64
/lib64/ld-linux-x86-64.so.2 ./ls
./ls: error while loading shared libra ...
原帖由 tom_xx_hu@yahoo 于 2007-8-8 23:35 发表
这不像是我的问题。你的ELF执行文件(本例./ls)编译生成环境与runtime环境不一样,这是不同版本的问题。你很麻烦了。
原帖由 tom_xx_hu@yahoo 于 2007-8-8 23:35 发表
这不像是我的问题。你的ELF执行文件(本例./ls)编译生成环境与runtime环境不一样,这是不同版本的问题。你很麻烦了。
原帖由 deng_save_file 于 2007-8-23 17:18 发表
怎么可能不同?从本机 cp 过去的 /bin/ls 文件 , 原本是可执行的,但去掉 x 属性后,再 mkisofs 成 iso 文件。重新 mount 它,就出现如上状况
原帖由 tom_xx_hu@yahoo 于 2007-8-24 05:31 发表
哎呀,要拿点分都这么不容易,要赚钱就更难了。
我现在想起两个可能的原因。一个是你的kernel是2.6系中的某一个有相关bug的,那你要更新核心了;另一个可能是你的系统环境用了libsafe。把uname -a和echo $L ...
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |