LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: lofeng410

请教几个小问题

[复制链接]
发表于 2008-10-25 04:47:50 | 显示全部楼层
友情提示:linux-gate 是不存在的。。:)。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-25 09:35:25 | 显示全部楼层
Post by 晨想;1898924
友情提示:linux-gate 是不存在的。。:)。

不存在是为何意?小生愚钝,还请版主帮忙解释一下
回复 支持 反对

使用道具 举报

发表于 2008-10-25 11:42:59 | 显示全部楼层
Post by lofeng410;1898953
不存在是为何意?小生愚钝,还请版主帮忙解释一下


其实是存在于内核里。不是一个独立出来的库。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-25 14:35:44 | 显示全部楼层
Post by ti8er;1899006
其实是存在于内核里。不是一个独立出来的库。

就是说能在内核中找到,于是乎就不需要路径什么的了?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-25 14:46:14 | 显示全部楼层
6.10. Re-adjusting the Toolchain
我写了个包含printf的dummy.c,然后执行下面的命令:
cc dummy.c -v -Wl,--verbose &> dummy.log

vim dummy.log,其中有如下语句:
attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc.so failed
attempt to open [color="Red"]/tools/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc.a succeeded
attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.so failed
attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.a failed
attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/lib/libgcc_s.so failed
attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/lib/libgcc_s.a failed
attempt to open /[color="red"]tools/bin/../i686-pc-linux-gnu/lib/libgcc_s.so failed
attempt to open /tools/bin/../i686-pc-linux-gnu/lib/libgcc_s.a failed
attempt to open /tools/i686-pc-linux-gnu/lib/libgcc_s.so failed
attempt to open /tools/i686-pc-linux-gnu/lib/libgcc_s.a failed
attempt to open /usr/lib/libgcc_s.so succeeded


而这时ld的搜索路径是:
/tools/i686-pc-linux-gnu/lib
/usr/lib
/lib

但是从上面看好像有搜索这三个路径之外的库,这时何故呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-25 15:22:15 | 显示全部楼层
Next make sure that we're using the correct libc:

grep "/lib/libc.so.6 " dummy.logIf everything is working correctly, there should be no errors, and the output of the last command will be:
[color="Red"]attempt to open /lib/libc.so.6 succeeded


我做的时候输出跟手册中的不一致,输出比手册中给的多,但是也包含有如下语句:
  1. attempt to open /lib/ld-linux.so.2 succeeded
复制代码


因此判断我的工具链调整是没有问题的,不知可对?
回复 支持 反对

使用道具 举报

发表于 2008-10-25 16:37:53 | 显示全部楼层
呵呵。是正确的。
你是直接用vim查看了dummy.log,当然它其中包含了最详细的信息。

而你仔细看看LFS手册,它每一个校验步骤,都用了grep命令来过滤。也就是把相对无用的信息去掉,只关注有用的信息。

所以,你的信息肯定是比手册中的要多。只要你的相对应的信息与手册一致就行了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-25 17:11:47 | 显示全部楼层
搜索路径好像不是很对的啊?
[HTML]attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc.so failed
attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc.a succeeded
attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.so failed
attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.a failed
attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/lib/libgcc_s.so failed
attempt to open /tools/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/lib/libgcc_s.a failed
attempt to open /tools/bin/../i686-pc-linux-gnu/lib/libgcc_s.so failed
attempt to open /tools/bin/../i686-pc-linux-gnu/lib/libgcc_s.a failed
attempt to open /tools/i686-pc-linux-gnu/lib/libgcc_s.so failed
attempt to open /tools/i686-pc-linux-gnu/lib/libgcc_s.a failed
attempt to open /usr/lib/libgcc_s.so succeeded[/HTML]
回复 支持 反对

使用道具 举报

发表于 2008-10-25 17:20:27 | 显示全部楼层
attempt to open /lib/libc.so.6 succeeded

信息太多了,你找找这句看看。
回复 支持 反对

使用道具 举报

发表于 2008-10-25 17:21:46 | 显示全部楼层
echo $PATH

我看看你的PATH。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表