[LLD][ELF] - Do not produce an invalid dynamic relocation order with --shuffle-sections.
Normally (when not on android with android relocation packing enabled), we put IRelative relocations to ".rel[a].dyn", after other relocations, to ensure that IRelatives are processed last by the dynamic loader. To achieve that we add the `in.relaIplt` after the `part.relaDyn`: https://github.com/llvm/llvm-project/blob/master/lld/ELF/Writer.cpp#L540 The problem is that `--shuffle-sections` might break the sections order. This patch fixes it. Fixes https://bugs.llvm.org/show_bug.cgi?id=47056. Differential revision: https://reviews.llvm.org/D85651
Loading
Please sign in to comment