Regarding to this topics, please let me ask one more question.

I think, the scope of removing the symbol lookup by the Android's
prelink, apriori
is local symbols (mailnly R_ARM_RELATIVE), so the lookup of the global
symbols,
for the undefined symbols still remain and they are done by the old-
style (sysv-style)
algorithm.

Is it correct ?

It it wholly right that Android's prelink removes the need for almost
all the local symbols
(80-90 percents of the symbols in .rel.dyn and .rel.plt) and it gives
much quicker performance
than the libraries without prelink.

But, I thnk the main benefit of using the gnu-hash is for the global
symbols.
It improves the time of searching the symbols for the global undefined
symbols.
According to some information in the internet, it gives 40-50% faster
relocation time
(depends on the structure of the libraries, of cource)
So, I think using the GNU-style hash in Android still gives some
benefit even if
almost all the local symbols are out of the scope of the relocation.

It is happy to give me the feedback, thank you.

-- Hoegaarden

> Thank you for your response.
> I see, as you memtioned if your original prelink removes the relocation,
> GNU-style hash may give less effect.
> Considering the Android's prelink functionality, I will investigate this.
> Thanks.
> -- Hoegaarden
>
> 2009/1/6 David Turner <[email protected]>
>
>
>
> > About a year ago, I implemented something similar in the Android system.
> > It was essentially the same thing than GNU-style hash with minor
> > modifications
> > (e.g. forcing power-of-2 table sizes to avoid the horribly slow modulo
> > operation on ARM
> > during lookups, plus selecting smaller table sizes by default).
>
> > testing showed that the benefit of this approach was absolutely minimal due
> > to our
> > custom pre-linking tool removing the need for most of the symbol lookups,
> > so it was
> > dropped.
>
> > it would be interesting to try that again though, but I suspect the result
> > will be similar.
>
> > On Mon, Jan 5, 2009 at 9:43 AM, [email protected] <
> > [email protected]> wrote:
>
> >> Hello,
> >> It seems that Android uses the gnu-ld, linker version 2.17 for
> >> both arm and i686.
> >> Is there any reason to use this version for Android ?
>
> >> More later version,e.g. 2.17.50.0.X of gnu-ld has the support
> >> of GNU-style hash, which gives much quicker relocation time in the
> >> runtime loader, especially for the binaries which use many libraries
> >> with
> >> many symbols.
> >> So, I think using the GNU-style hash for Android may give the better
> >> performance of the runtime boot.
> >> (Note that using this hash requires the additional implementation
> >> of bionic linker)
>
> >> Thank you very much.
>
> >> -- Hoegaarden- 引用テキストを表示しない -
>
> - 引用テキストを表示 -
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to