[PATCH] D16018: Only emit files with subsections_via_symbols if all inputs had that set

Pete Cooper via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 17:19:40 PST 2016


pete created this revision.
pete added reviewers: kledzik, lhames.
pete added a subscriber: llvm-commits.
pete added a project: lld.

Hi Nick, Lang

The test case parse-data-relocs-x86_64.yaml wasn't generating the same output when round tripped through lld -r.

The reason was that we were always emitting the file with the MH_SUBSECTIONS_VIA_SYMBOLS attribute, even though the input file didn't have that set.

This patch checks the files for the emitted atoms and only if they all have that attribute set, we emit the output file with that set.

Thanks,
Pete

http://reviews.llvm.org/D16018

Files:
  lib/ReaderWriter/MachO/File.h
  lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
  test/mach-o/parse-data-relocs-x86_64.yaml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16018.44390.patch
Type: text/x-patch
Size: 4525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160109/045878b1/attachment.bin>


More information about the llvm-commits mailing list