PSARC/2007/509 elfedit
Ali Bahrami
Ali.Bahrami at sun.com
Thu Sep 6 10:13:50 PDT 2007
James Carlson wrote:
> Ali Bahrami writes:
>> The mechanism used to handle this is in fact based on isaexec(). The
>> linker tools all use a common internal function named conv_check_native()
>> that examines the LD_NOEXEC_64 environment variable to decide what to
>> do, and then uses isaexec() to do the work. elfedit is following this
>> family pattern.
>
> I was actually referring to /usr/lib/isaexec, which is used as a
> hard-link for dozens of utilities with identical needs.
>
> I realize the answer for elfdump might just be "history," but why does
> elfedit follow elfdump's pattern?
>
> And why would a user want to (or need to) set LD_NOEXEC_64 ... ?
>
Sorry, I missed that you were talking about the wrapper rather
than the function.
I agree that there is not much value to the end user in setting
LD_NOEXEC_64 for elfedit. However, someone writing an elfedit module might
need to force the 32-bit version of their code to run for testing reasons.
The ability to let the user do that is one reason not to use /usr/lib/isaexec,
while following the "linker herd" is the other.
The performance impact should be minimal --- the call to isaexec happens
before the 32-bit elfedit does any work beyond argument processing, so
the difference between what elfedit and /usr/lib/isaexec do is small.
I just used cscope to find out who uses conv_check_native:
crle, dump, elfdump, ld, mcs/strip, moe, nm, pvs
It's a larger club than just elfdump.
- Ali
More information about the opensolaris-arc
mailing list