[PATCH] D72194: [MC][ELF] Ensure that mergeable globals with an explicit section are assigned to SHF_MERGE sections with compatible entsizes

ben via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 11:08:57 PDT 2020


bd1976llvm updated this revision to Diff 258096.
bd1976llvm added a comment.

Thanks to everyone for reviewing/guiding me though this change. When I started this I hadn't looked at lowering in LLVM in any detail so thanks for sticking with reviewing the code when I was basically learning on the job.

Due to COVID disruption I have waited until today to push as I wanted to be sure that I had the bandwidth to deal with any disruption this causes.

I believe that we have made a change that has a good likelihood of being acceptable whilst also offering consistent and understandable behaviour. Nevertheless, this change could easily cause problems. For example, examining the change in behaviour in "clang/test/CodeGen/cfstring-elf-sections-x86_64.c " it is possible that some toolchains may reject SHF_MERGE .rodata sections. We agreed, when starting to look at this, to "make a reasonable change and see what breaks".. so here goes.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72194/new/

https://reviews.llvm.org/D72194

Files:
  clang/test/CodeGen/cfstring-elf-sections-x86_64.c
  llvm/include/llvm/IR/DiagnosticInfo.h
  llvm/include/llvm/MC/MCContext.h
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/MC/MCContext.cpp
  llvm/test/CodeGen/X86/explicit-section-mergeable.ll
  llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp
  llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72194.258096.patch
Type: text/x-patch
Size: 34210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200416/6af96619/attachment.bin>


More information about the llvm-commits mailing list