1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/MC/MachO
Michael Trent 721829227e [ MC ] Match labels to existing fragments even when switching sections.
(This commit restores the original branch (4272372c571) and applies an
additional change dropped from the original in a bad merge. This change
should address the previous bot failures. Both changes reviewed by pete.)

Summary:
This commit builds upon Derek Schuff's 2014 commit for attaching labels to
existing fragments ( Diff Revision: http://reviews.llvm.org/D5915 )

When temporary labels appear ahead of a fragment, MCObjectStreamer will
track the temporary label symbol in a "Pending Labels" list. Labels are
associated with fragments when a real fragment arrives; otherwise, an empty
data fragment will be created if the streamer's section changes or if the
stream finishes.

This commit moves the "Pending Labels" list into each MCStream, so that
this label-fragment matching process is resilient to section changes. If
the streamer emits a label in a new section, switches to another section to
do other work, then switches back to the first section and emits a
fragment, that initial label will be associated with this new fragment.
Labels will only receive empty data fragments in the case where no other
fragment exists for that section.

The downstream effects of this can be seen in Mach-O relocations. The
previous approach could produce local section relocations and external
symbol relocations for the same data in an object file, and this mix of
relocation types resulted in problems in the ld64 Mach-O linker. This
commit ensures relocations triggered by temporary labels are consistent.

Reviewers: pete, ab, dschuff

Reviewed By: pete, dschuff

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71368
2019-12-18 09:55:54 -08:00
..
AArch64 [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
ARM [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
PowerPC
absolute.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
absolutize.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
alias.s
altentry.s
bad-darwin-x86_64-32-bit-abs-addr.s
bad-darwin-x86_64-diff-relocs.s
bad-darwin-x86_64-reloc-expr.s
bad-dollar.s
bad-indirect-symbols.s
bad-macro.s
bad-reloc.s
bss.s
build-version-maccatalyst.s [macCatalyst] Use macCatalyst pretty name in .build_version darwin 2019-07-12 22:06:08 +00:00
build-version-with-sdk-version.s
coal-sections-x86_64.s
comm-1.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
cstexpr-gotpcrel-32.ll [MachO][TLOF] Use hasLocalLinkage to determine if indirect symbol is local 2019-08-22 16:59:00 +00:00
cstexpr-gotpcrel-64.ll
darwin-complex-difference.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
darwin-sdk-version.ll
darwin-version-min-load-command.s [macCatalyst] Print out macCatalyst in llvm-objdump for the platform 2019-07-03 17:46:30 +00:00
darwin-x86_64-diff-reloc-assign-2.s
darwin-x86_64-diff-reloc-assign.s
darwin-x86_64-diff-relocs.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
darwin-x86_64-nobase-relocs.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
darwin-x86_64-reloc-offsets.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
darwin-x86_64-reloc.s
data.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
debug_frame.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
diff-with-two-sections.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
direction_labels.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
eh_symbol.s
eh-frame-reloc.s
empty-twice.ll
file.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
gen-dwarf-cpp.s
gen-dwarf-macro-cpp.s
gen-dwarf-producer.s
gen-dwarf.s
i386-large-relocations.s
indirect-symbols.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
jcc.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
lcomm-attributes.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
linker-option-1.s
linker-option-2.s
linker-options.ll
lit.local.cfg [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
loc.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
osx-version-min-load-command-with-sdk-errors.s
osx-version-min-load-command-with-sdk.s
osx-version-min-load-command.s
pcrel-to-other-section.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
pending-labels.s [ MC ] Match labels to existing fragments even when switching sections. 2019-12-18 09:55:54 -08:00
pr19185.s
previous.s
pushsection.s
relax-jumps.s
relax-recompute-align.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
reloc-diff.s
reloc-pcrel-offset.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
reloc-pcrel.s
reloc.s [X86][MC] no error diagnostic for out-of-range jrcxz/jecxz/jcxz 2019-11-26 14:32:17 +03:00
section-align-1.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
section-align-2.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
section-attributes.s
section-flags.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
string-table.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
symbol-diff.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
symbol-flags.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
symbol-indirect.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
symbols-1.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
tbss.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
tdata.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
temp-labels.s
thread_init_func.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
tls.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
tlv-bss.ll
tlv-reloc.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
tlv.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
undefined-directional.s
values.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
variable-errors.s
variable-exprs.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
weakdef.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
x86_32-optimal_nop.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
x86_32-scattered-reloc-fallback.s
x86_32-sections.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
x86_32-symbols.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
x86_64-mergeable.s
x86_64-reloc-arithmetic.s
x86_64-sections.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
x86_64-symbols.s
x86-data-in-code.s
zero-space.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
zerofill-1.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
zerofill-2.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
zerofill-3.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
zerofill-4.s
zerofill-5.s [llvm-readobj][MachO] Fix section type printing 2019-08-15 07:22:04 +00:00
zerofill-sect-align.s
zerofill-text.s