Off-Topic > Off-Topic - Tiny Tux's Corner

What does "configure --prefix ..." set in elf exec.?

(1/1)

SunBurnt:
I`ve read docs. describing the configure options, but nothing tells what "--prefix" does.
I know it relocates the root path that the compiled exec. uses to find it`s "other files".
# But what does it do to the exec.? I can`t find any info as to exactly what it changes.

I`ve been looking at RPATH docs., and playing with patchelf seeing what can be done.
patchelf patches the RPATH in execs. to dep. libs., and RPATH in libs. to dep. libs.
I`m not sure if it will set an exec`s. path to dep. execs., but I kinda doubt it...

So with no compiling patchelf sets an exec. or lib. path to a dep. lib.

# Can this be done for the exec`s. path to other deps.?

Like "--prefix" does but working with binaries, so no compiling the whole package.

curaga:
It does nothing to the binaries by default. Only in packages where the creators have explicitly made it so does it have an effect.

If the package uses it, you can't likely change it afterwards, as the method of embedding is not standard. Usually it's a define, where to change it you'd need to go hex-editing in per-binary locations, which could break the app.

SunBurnt:
Thank you so much for responding curaga; If possible I`d like to clarify this a bit.

prepath embeds code into the exec., IF the author has written the app. that way.

# Is it common practice to write apps. this way? # Are most apps. configurable?

( I`m sure a clever coder like the author of patchelf could make a utility to do this...)

curaga:
Yes, you got it.

I think it's about 50-50 on which apps embed paths.

Navigation

[0] Message Index

Go to full version