Bart Smaalders wrote: > Hi guys - > > I'm trying to use configure and setting DESTDIR to compile > wireshark for the sfw consolidation; as a result of a dependency > on a static library (libpcap) configure is generating a -R<dir>, > where <dir> is my proto area. > > This is awkward and difficult to engineer out of configure. > > Is there a way to edit the RUNPATH of the resulting executable > post-linking with our existing tools so the build machine's > proto area doesn't end up in the finished binary? > > Thanks - > > - Bart >
You built this on a fairly new version of Nevada I presume? This is the worst sort of vaporware, still in the lab and changing daily. However, if you log onto the test zone on my desktop, there is a program installed there that will do this. It should be stable tonight, but if you try to use it tomorrow and it breaks, it's probably because I'm working on it... :-) The following adds a runpath to /bin/ls: % ssh rtld-test.central % elfedit -e 'dyn:runpath path1:path2' /bin/ls foo % elfdump -d foo | grep PATH [30] RUNPATH 0x3e6 path1:path2 If you want to see the gory details, toss -d on the command: % elfedit -d -e 'dyn:runpath path1:path2' /bin/ls foo elfedit: 64-bit version elfedit: copied /bin/ls to output file: foo elfedit: [19].dynamic[27]: Set DF_1_EDITED flag elfedit: load module: dyn: /export/home/ali/elfedit/onnv/proto/root_i386/usr/lib/elfedit/amd64/dyn.so elfedit: command: dyn:runpath path1:path2 elfedit: [19].dynamic: dynamic section elfedit: [6].dynstr: string table section elfedit: [6].dynstr[998]: Using 12/512 byes from reserved area to add string: path1:path2 elfedit: [19].dynamic: No existing runpath to modify. Will use extra DT_NULL in slot [30] elfedit: command: write elfedit: command: quit (Offer void where prohibited by law. Limitations may apply.) - Ali