QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 963|回复: 9

[升级] prelink 更新至 0.3.2

[复制链接]
发表于 2004-10-3 12:04:47 | 显示全部楼层 |阅读模式
用于加快大型程序启动。这是最新版本。安装后请运行:
prelink -afmR
请耐心等待,非常费时间。会有一些报错,目前未发现不良影响,但仍建议慎重使用。如果有重要库文件升级,或者安装大量软件包,请重新运行此命令。

http://www.magiclinux.org/people/kde/magic/rpms/midi.software/prelink-0.3.2-1mgc.i686.rpm

http://www.magiclinux.org/people/kde/magic/srpms/prelink-0.3.2-1mgc.src.rpm
 楼主| 发表于 2004-10-3 13:21:20 | 显示全部楼层
[root@localhost ~]# prelink -a
prelink: /usr/bin/fbtv: Could not parse `/usr/bin/fbtv: error while loading shared libraries: liblirc_client.so.0: cannot open shared objectfile: No such file or directory'
prelink: /usr/bin/motv: Could not parse `/usr/bin/motv: error while loading shared libraries: liblirc_client.so.0: cannot open shared objectfile: No such file or directory'
prelink: /usr/bin/xawtv: Could not parse `/usr/bin/xawtv: error while loading shared libraries: liblirc_client.so.0: cannot open shared object file: No such file or directory'
prelink: /usr/lib/libdivxdecore.so.0: Not enough room to add .dynamic entry
prelink: /usr/bin/r++: Cannot prelink against non-PIC shared library /usr/lib/kde3/libkdevcppsupport.so
prelink: /usr/bin/kwave.kss: Cannot prelink against non-PIC shared library /usr/lib/libGL.so.1
prelink: /usr/bin/kpovmodeler: Cannot prelink against non-PIC shared library /usr/lib/libGL.so.1
prelink: /usr/bin/keuphoria.kss: Cannot prelink against non-PIC shared library /usr/lib/libGL.so.1
prelink: /usr/lib/libdivxencore.so.0: Not enough room to add .dynamic entry
prelink: /usr/X11R6/bin/glxinfo: Cannot prelink against non-PIC shared library /usr/lib/libGL.so.1
prelink: /usr/bin/ksolarwinds.kss: Cannot prelink against non-PIC shared library /usr/lib/libGL.so.1
prelink: /usr/bin/kfountain.kss: Cannot prelink against non-PIC shared library /usr/lib/libGL.so.1
prelink: /usr/bin/kflux.kss: Cannot prelink against non-PIC shared library /usr/lib/libGL.so.1
prelink: /usr/bin/kgravity.kss: Cannot prelink against non-PIC shared library /usr/lib/libGL.so.1
prelink: /usr/bin/pia: Cannot prelink against non-PIC shared library /usr/lib/libGL.so.1
prelink: /usr/bin/kspace.kss: Cannot prelink against non-PIC shared library /usr/lib/libGL.so.1

大家看看台湾翻译的 gentoo 手册关于 prelink 的部分。
http://www.gentoo.org.tw/doc/prelink-howto.xml
分析:
1. magic beta3 有些文件的确缺,否则就不会有那么多毁损的依赖关系。
2. 如果不支持编译参数 -fPIC 的库不能 prelink。
但这些没有大碍。
回复

使用道具 举报

 楼主| 发表于 2004-10-3 14:13:23 | 显示全部楼层
一些说明(来自 man gcc):

       -fpic
           Generate position-independent code (PIC) suitable for use in a
           shared library, if supported for the target machine.  Such code
           accesses all constant addresses through a global offset table
           (GOT).  The dynamic loader resolves the GOT entries when the pro-
           gram starts (the dynamic loader is not part of GCC; it is part of
           the operating system).  If the GOT size for the linked executable
           exceeds a machine-specific maximum size, you get an error message
           from the linker indicating that -fpic does not work; in that case,
           recompile with -fPIC instead.  (These maximums are 16k on the m88k,
           8k on the SPARC, and 32k on the m68k and RS/6000.  The 386 has no
           such limit.)

           Position-independent code requires special support, and therefore
           works only on certain machines.  For the 386, GCC supports PIC for
           System V but not for the Sun 386i.  Code generated for the IBM
           RS/6000 is always position-independent.

       -fPIC
           If supported for the target machine, emit position-independent
           code, suitable for dynamic linking and avoiding any limit on the
           size of the global offset table.  This option makes a difference on
           the m68k, m88k, and the SPARC.

           Position-independent code requires special support, and therefore
           works only on certain machines.

       -fpie
       -fPIE
           These options are similar to -fpic and -fPIC, but generated posi-
           tion independent code can be only linked into executables.  Usually
           these options are used when -pie GCC option will be used during
           linking.
回复

使用道具 举报

发表于 2005-2-20 08:42:43 | 显示全部楼层
ftp://ftp.univie.ac.at/systems/linux/fedora/updates/3/i386/prelink-0.3.3-0.fc3.i386.rpm
回复

使用道具 举报

发表于 2005-2-20 08:43:40 | 显示全部楼层
http://www.gentoo.org/doc/en/prelink-howto.xml
回复

使用道具 举报

发表于 2005-2-20 08:45:16 | 显示全部楼层
我补充 补充
回复

使用道具 举报

 楼主| 发表于 2005-2-20 13:50:07 | 显示全部楼层
早就升级到 0.3.3 了。不要向我们提供 rpm,我们不能使用非本地编译版本,若有好的 src.rpm 可以推荐。
回复

使用道具 举报

发表于 2005-2-20 19:00:03 | 显示全部楼层
一番好意 结果..
回复

使用道具 举报

 楼主| 发表于 2005-2-22 21:26:53 | 显示全部楼层
谢谢你。 不过使用其他发行版的 rpm 会引入依赖问题,而且可能有其他隐含风险,比如 rpm 内嵌的脚本可能修改系统配置。
回复

使用道具 举报

发表于 2005-2-23 06:52:26 | 显示全部楼层
这么严重阿  
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-26 20:43 , Processed in 0.050638 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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