[PATCH] D37574: [ELF] - Do not merge sections from SHT_GROUP when -relocatable

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 15:52:45 PDT 2017


ruiu added a comment.

> What is intention of relocatable link and why it is called "partial linking" ? As far I understand intention is to speedup final link.
> When we have multiple .text sections for example, then relocatable link merge them by name to output .text. Merging of sections helps to reduce amount of
>  input sections for latter final link. We also merge SHT_REL[A] sections when doing that, it should probably help to speedup futher relocation processing as well.
>  As a last resort is also consistent with GNU linkers, it may be dangerous to deviate without solid reason as all kind of tools may rely on this behavior.

I don't agree. As we have found when you tried to implement the -r option, a lot of information that can be merged are passed through instead of being merged for a relocatable link. If sections have to be merged for some reason, that is fine, but both "-r is for speeding up the linking" and "doing something different than GNU linkers is dangerous" are not convincing arguments.


https://reviews.llvm.org/D37574





More information about the llvm-commits mailing list