[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: Audit external function called indirectly via GOT



On 03/21/2018 03:04 PM, Florian Weimer wrote:
> * H. J. Lu:
> 
>>> Could we ship a template for the PLT entries in ld.so instead?  And if
>>> needed, map it from the file together with an address array, like this?
>>
>> This won't work since linker needs to know exactly PLT layout to generate
>> JUMP_SLOT relocations for LD_AUDIT.
> 
> Why would we need JUMP_SLOT relocations?  Couldn't we install suitable
> interceptors for GLOB_DAT relocations instead, as long as they resolve
> to external function symbols?

I think your suggestion might work, but why alter the existing behaviour which
users expect and is documented in countless linker text books?

Existing tooling to process such relocations and entries could remain unchanged
and we would continue to support LD_AUDIT.

What other benefits would we gain from your suggestion?

Cheers,
Carlos.