This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: prelink ok?

All I know documents about prelink is man and following link,, Seems not enough to solve my question.

Seem I got your meaning UND is left for purpose for when prelinking can't be used, exec and libs still works.

three questions remains:
1) I judge prelink works is look at /proc/pid/maps address conforms, Is this right?
2) I judge if prelink could bootup startup , by calculating the elapse of the fork of new process to first line of main(), if the time(symbol resolving stage?) is shorten, I could say it works?
3) prelink show undefined non-weak symbols, for I use arm version prelink,ldd(can't show non-weak symbol by using ldd -d -r), I tried to use readelf to get non-weak symbol, but seen none, Any other ways?

sorry, new to prelink, so many questions.
Thanks you
From: Jakub Jelinek <>
Reply-To: Jakub Jelinek <>
To: tong changda <>
Subject: Re: prelink ok?
Date: Wed, 15 Jun 2005 07:54:32 +0200

On Wed, Jun 15, 2005 at 11:27:10AM +0800, tong changda wrote:
> Hello everybody
> sorry if not proper to ask here
> I use prelink on arm dynamic library and execute file. prelink -av
> without warning, but readelf shows some unexpects:
> /lib/               420b8000-420fb8b8
> 0x00000001 (NEEDED)                 Shared library: []
> .....
> 57: 420faacc    32 OBJECT  GLOBAL DEFAULT   13 pam_image_format
> 58: 00000000   252 FUNC    GLOBAL DEFAULT  UND strchr@GLIBC_2.0 (2)
> our symbol external is left unsolved, but local symbol are solved the
> address normally,
> I think after prelink there should be no UND symbol,Did I compile the
> library the wrong way?

prelink doesn't change undefined symbols in this way.
All it does is 1) relocate the shared library to a certain fixed address
2) apply relocations 3) prepare things for the dynamic linker, so that if
all libraries and the binary are mapped in the right places and have not
been changed since prelinking, can skip all the relocation handling
and instead just apply some fixups
The shared libraries must still be usable even when prelinking can't be
used.  So e.g. the changing of undefined symbols you are expecting
(why?) certainly must not be done, as otherwise the shared library
or binary wouldn't be usable when prelinking can't be used.
Please read prelink's documentation if you want to know more.


免费下载 MSN Explorer:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]