diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-08-25 18:31:14 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-11-13 20:42:03 +0000 |
| commit | 6e75b2fbf9a03e6876e0a3c089e0b3ad71876125 (patch) | |
| tree | 99735c2ca8ca6802f71b32a2bd61f048b1fd749e /contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
| parent | fe6060f10f634930ff71b7c50291ddc610da2475 (diff) | |
| parent | d545c2ce5ad1891282e8818b47ffe557c76a86b4 (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index add34eccc1f3..de096f95afcb 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -677,8 +677,9 @@ calcUniqueIDUpdateFlagsAndSize(const GlobalObject *GO, StringRef SectionName, } if (Retain) { - if (Ctx.getAsmInfo()->useIntegratedAssembler() || - Ctx.getAsmInfo()->binutilsIsAtLeast(2, 36)) + if ((Ctx.getAsmInfo()->useIntegratedAssembler() || + Ctx.getAsmInfo()->binutilsIsAtLeast(2, 36)) && + !TM.getTargetTriple().isOSSolaris()) Flags |= ELF::SHF_GNU_RETAIN; return NextUniqueID++; } @@ -855,8 +856,10 @@ static MCSection *selectELFSectionForGlobal( EmitUniqueSection = true; Flags |= ELF::SHF_LINK_ORDER; } - if (Retain && (Ctx.getAsmInfo()->useIntegratedAssembler() || - Ctx.getAsmInfo()->binutilsIsAtLeast(2, 36))) { + if (Retain && + (Ctx.getAsmInfo()->useIntegratedAssembler() || + Ctx.getAsmInfo()->binutilsIsAtLeast(2, 36)) && + !TM.getTargetTriple().isOSSolaris()) { EmitUniqueSection = true; Flags |= ELF::SHF_GNU_RETAIN; } |
