This is the mail archive of the
mailing list for the binutils project.
Add RPATH/RUNPATH entry
- From: JÃrg Richter <joerg dot richter at pdv-fs dot de>
- To: binutils at sources dot redhat dot com
- Date: Wed, 15 Jul 2009 10:10:14 +0000 (UTC)
- Subject: Add RPATH/RUNPATH entry
My ultimate goal is to add an RPATH or RUNPATH entry to a shared library or
executable. But without using the original object files.
I know about chrpath. But it doesn't match my needs. I also want to add
RPATH if there was non before.
One might think that ld can do it somehow along the lines of:
ld -shared -rpath DIR -o libA2.so libA.so
But this doesn't work as (I) expected. libA.so is only referenced as NEEDED
but not copied. Can this even theoretical work?
My next guess is objcopy. But I found already that this was discussed before
and it is not (yet) possible.
Now I'm thinking about adding this functionality to objcopy. Do you think this
is the right tool to do it?