[PATCH] D40070: [ELF] - Don't emit broken relocations for SHF_MERGE sections when --emit-relocs is used.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 03:30:01 PST 2017


grimar marked 4 inline comments as done.
grimar added a comment.

In https://reviews.llvm.org/D40070#927204, @ruiu wrote:

> So, synthetic sections have no relocations, right?


Right.

> But mergeable synthetic section is an exception.

No. Mergeable synthetic sections also have no relocations.

We have synthetic section .debug_str, for example. And .debug_info that uses it.
.debug_info has relocations (has '.rela.debug_info' section). But .debug_str not.
.debug_str is used for relocation calculation for different section, which is .debug_info,
but it does not have relocations by itself.


https://reviews.llvm.org/D40070





More information about the llvm-commits mailing list