[PATCH] D65995: [ELF] Don't special case symbolic relocations with 0 addend to ifunc in writable locations

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 00:44:02 PDT 2019


peter.smith added a comment.

In D65995#1626470 <https://reviews.llvm.org/D65995#1626470>, @MaskRay wrote:

> In D65995#1626365 <https://reviews.llvm.org/D65995#1626365>, @pcc wrote:
>
> > HWASAN should only be using GOT relative relocations to access shadow memory, so I wouldn't expect this change to have an impact on HWASAN.
>
>
> Thanks for clarification!


Thanks, I've no more objections.

>> I wouldn't object too much to removing this code at this point, but it may be worth bringing it back if we ever manage to improve relocation processing here to make this simpler to implement.
> 
> Do you have other things in mind that this may be beneficial?

I think that there are a few things that are made difficult due to a single pass through the relocations. For correctness we can always make decisions based on considering a relocation in isolation, but there are a few optimizations where we need to know about all the relocations. For example if we know that there is no need to create a canonical PLT then we could very easily avoid a lot of the complexity. This is easier said than done though, we'd need to be careful of performance as there can be a lot of relocations in a program.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65995/new/

https://reviews.llvm.org/D65995





More information about the llvm-commits mailing list