[lld] r367745 - [ELF] Move R_*_IRELATIVE from .rel[a].plt to .rel[a].dyn unless --pack-dyn-relocs=android[+relr]

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 3 09:34:40 PDT 2019


On Sat, Aug 03, 2019 at 02:26:53AM -0000, Fangrui Song via llvm-commits wrote:
> Author: maskray
> Date: Fri Aug  2 19:26:52 2019
> New Revision: 367745
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=367745&view=rev
> Log:
> [ELF] Move R_*_IRELATIVE from .rel[a].plt to .rel[a].dyn unless --pack-dyn-relocs=android[+relr]

I'm a bit puzzled by this. IRELATIVE relocations can happen in .dyn and
.plt, depending on how ifunc is referenced. E.g. if it is used
indirectly, it must be .dyn, but if it is called directly as PLT call,
it must be in .plt. So the code has to support both caess anyway.

Joerg


More information about the llvm-commits mailing list