Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Prelink Question..

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
Zarathustra[H]
Guru
Guru
User avatar
Posts: 389
Joined: Mon Dec 30, 2002 12:30 am
Location: Cambridge, MA, USA

Prelink Question..

  • Quote

Post by Zarathustra[H] » Sun Jun 01, 2003 12:14 am

Hi

I know from reading the faq's that prelinking involves associating files with the libraries they depend on in order to make them faster. What I dont understand is how.

Does Prelink integrate the libraries into the excecutable? If so, how is this different from static linking. Doesnt this use a lot of additional disk space?

Thanks,
Matt
----
Athlon 64 3000+ / 1Gb Kingston Hyperx PC3500 / MSI K8N Neo / Geforce 6800GT
----
Top
Safrax
Guru
Guru
Posts: 422
Joined: Tue Apr 23, 2002 7:35 pm

  • Quote

Post by Safrax » Sun Jun 01, 2003 2:21 am

I tried looking up information on prelinking on google..

Found a few snippets but nothing major.

http://www.gentoo.org/doc/en/prelink-howto.xml
http://freshmeat.net/projects/prelink/?topic_id=253
http://klecker.debian.org/~chris/prelink/
Top
Zarathustra[H]
Guru
Guru
User avatar
Posts: 389
Joined: Mon Dec 30, 2002 12:30 am
Location: Cambridge, MA, USA

  • Quote

Post by Zarathustra[H] » Sun Jun 01, 2003 3:29 am

Safrax wrote:I tried looking up information on prelinking on google..

Found a few snippets but nothing major.

http://www.gentoo.org/doc/en/prelink-howto.xml
http://freshmeat.net/projects/prelink/?topic_id=253
http://klecker.debian.org/~chris/prelink/
Yeah That's more or less what I found as well..

Really doesnt help answer my questions..

Anyone have any ideas?
----
Athlon 64 3000+ / 1Gb Kingston Hyperx PC3500 / MSI K8N Neo / Geforce 6800GT
----
Top
jonaswhale
n00b
n00b
Posts: 38
Joined: Thu Jul 17, 2003 1:51 am
Location: Maryland

1 idea...

  • Quote

Post by jonaswhale » Thu Jul 31, 2003 9:01 am

I don't have an Idea but a good place to start is the source code.

hope that opened doors for someone, sometimes its not so obvious.
Technology should be indistinguishable from magic.
Top
strobhen
n00b
n00b
Posts: 7
Joined: Fri Oct 17, 2003 1:22 pm
Location: Orlando, FL

  • Quote

Post by strobhen » Thu Nov 06, 2003 1:48 am

To understand prelinking you need to understand a little bit about linking :).

I am no expert in the field, but I can give a really high level overview of what's going on.

Basically, when you compile a program, there are some things that cannot be figured out at compile-time. For instance, the locations of dynamically linked libraries -- these must be figured out at runtime (otherwise, what's the point of dynamically linked libraries?). This certainly takes time, as hard drives are fairly slow and a good amount of information must be gathered.

Once all this information is gathered the linker performs bytecode manipulation of the entire program after it is loaded into memory but before it runs. The process could take a little more time for large binaries here as well.

So prelinking would almost be like a pseudo-static link. Perhaps a static link that could be removed. It might still be slower than static linking as the linker is still going to have to determine where the library is in memory (no way to determine that in advance, unlike disk location). But the advantage here is that the prelink can be removed, unlike static linking.

So basically a prelinker is taking as much load off the linker (and therefore the load-time) as possible. Please note, however, that prelinking or statically linking will not make a program any faster _after_ it has loaded.
Top
Post Reply

5 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic