Re: [RFC] Un-staticise the toolchain

看板FB_current作者時間13年前 (2012/05/02 10:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串27/30 (看更多)
Den 01/05/2012 kl. 07.52 skrev Tim Kientzle: >=20 > On Apr 30, 2012, at 6:41 AM, Erik Cederstrand wrote: >>=20 >> Can anyone explain to me why the dynamically linked version is = significantly slower? What are the extra steps involved compared to a = statically linked binary? >=20 > At the risk of dramatically over-simplifying=85. >=20 > When a static binary is started by the kernel, it does the following: > * Initializes some libc internals. > * Calls main. >=20 > When a dynamic binary is started by the kernel, it does the following: > * Initializes some libc internals. > * For every dynamic library referenced by this executable: > - loads the dynamic library into memory > - fixes up references > * Calls main >=20 > The process of loading the required libraries and fixing up references > can be quite time-consuming. Thanks for the explanation. In the previous 'make index' benchmark by = Chris, make is called very often, which means the dynamic libraries = should already be loaded into memory after the first run, right? Which = means the extra time is being spent fixing up references? Erik= _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1Fe9M1R0 (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1Fe9M1R0 (FB_current)