Add a comment.

llvm-svn: 295388
This commit is contained in:
Rui Ueyama 2017-02-17 00:40:44 +00:00
parent c18b67745b
commit 5acac350e7
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,9 @@ StringRef elf::getOutputSectionName(StringRef Name) {
if (Config->Relocatable)
return Name;
// If -emit-relocs is given (which is rare), we need to copy
// relocation sections to the output. If input section .foo is
// output as .bar, we want to rename .rel.foo .rel.bar as well.
if (Config->EmitRelocs) {
for (StringRef V : {".rel.", ".rela."}) {
if (Name.startswith(V)) {