This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: What does the linker do with a shared library?


Michael Morrell <morrell@alumni.ucsd.edu> writes:

> Thanks for the information.  It doesn't really address all the things
> a linker does when it processes a shared library.  You only mention
> adding entries to the GOT and PLT (unless I missed something).
>
> Aside from creating entries in the dynamic section (for which I
> understand the big picture, but I expect I'm missing some details),
> what else is done?
>
> I believe I read that, until fairly recently, the linker was updating the
> symbol size of UNDEF symbols in the executable (which are supposed to
> always be zero) with the size of a function found in a shared library
> (using the shared library's symbol table).

That was a bug.  If you want an answer at the level of detail, I think
you will need to examine the source code.

Otherwise, I'm not sure what you're asking.  In the big picture, it
sets up the GOT, the PLT, the dynamic section, the dynamic symbol
table, the dynamic relocations, the interpreter section and segment,
the version sections.

Ian


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