[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 Jan 16 16:23:07 PST 2020


bd1976llvm updated this revision to Diff 238629.
bd1976llvm added a comment.
Herald added a subscriber: aheejin.

I rebased the patch and addressed the review comments. I also noticed that there was a problem with the patch when explicitly placing non-mergeable sections into one of the "default" mergeable sections (e.g. .debug_str). As these "default" mergeable sections were not being added to the map it wasn't possible to explicitly place symbols into these even if the symbols entsize was compatible (as they would be put into a uniqued section instead). This is not acceptable for these "default" sections since for some of these like e.g. .debug_str, current binutils consumers make the assumption that there can only be one of these sections. The fix for this is WIP and I haven't added LIT tests for it yet; but, I have put up the patch in WIP state to get comments on the approach taken.


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/CodeGen/TargetLoweringObjectFileImpl.h
  llvm/include/llvm/MC/MCContext.h
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/Target/TargetLoweringObjectFile.cpp
  llvm/test/CodeGen/X86/explict-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.238629.patch
Type: text/x-patch
Size: 67497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200117/7e56283b/attachment-0001.bin>


More information about the llvm-commits mailing list