From: Remco P. <r....@sa...> - 2004-08-18 18:23:11
|
On Mon, 16 Aug 2004 17:05:37 -0500 David Clissold <cl...@au...> wrote: > At the risk of giving an over-simplified example: you can change the > library search path in an executable that has already been created, as > long as it hasn't been stripped. Basically, you just relink it with > the -blibpath option to ld, specifying the runtime libpath that you want. > In a basic example, you might have executable "foo" and use it to relink > and create "foo2": > > $ ld -blibpath:/usr/lib:/lib:/usr/local/lib -lc foo -o foo2 > > So if "foo" didn't have /usr/local/lib in its library search path, "foo2" > now does. Run "dump -Hv" on each executable to compare. > > This is overly basic, because I've only got "-lc" for libc.a and you > wouldn't need /usr/local/lib for that, but it should show the basic > idea. You'd add more "-lxxx" options as needed. > David, thanks, this is what I was looking for. -- Met vriendelijke groeten, Remco Post SARA - Reken- en Netwerkdiensten http://www.sara.nl High Performance Computing Tel. +31 20 592 3000 Fax. +31 20 668 3167 "I really didn't foresee the Internet. But then, neither did the computer industry. Not that that tells us very much of course - the computer industry didn't even foresee that the century was going to end." -- Douglas Adams |