llvm-6502/test
Rafael Espindola 0a70f9b3b9 Look through variables when computing relocations.
Given

bar = foo + 4
	.long bar

MC would eat the 4. GNU as includes it in the relocation. The rule seems to be
that a variable that defines a symbol is used in the relocation and one that
does not define a symbol is evaluated and the result included in the relocation.

Fixing this unfortunately required some other changes:

* Since the variable is now evaluated, it would prevent the ELF writer from
  noticing the weakref marker the elf streamer uses. This patch then replaces
  that with a VariantKind in MCSymbolRefExpr.

* Using VariantKind then requires us to look past other VariantKind to see

	.weakref	bar,foo
	call	bar@PLT

  doing this also fixes

	zed = foo +2
	call zed@PLT

  so that is a good thing.

* Looking past VariantKind means that the relocation selection has to use
  the fixup instead of the target.

This is a reboot of the previous fixes for MC. I will watch the sanitizer
buildbot and wait for a build before adding back the previous fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204294 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-20 02:12:01 +00:00
..
Analysis Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
Assembler Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
Bindings Fix the ocaml test to not create a alias to a declaration. 2014-03-12 21:20:42 +00:00
Bitcode Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
BugPoint llvm/test/BugPoint/compile-custom.ll.py: Make it py3-compatible. [PR19112] 2014-03-13 00:10:37 +00:00
CodeGen R600/SI: Add support for 64-bit LDS writes 2014-03-19 22:19:54 +00:00
DebugInfo Revert "Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc." 2014-03-20 00:12:06 +00:00
ExecutionEngine Ignore old JIT tests in AARch64 - CMake style 2014-02-25 09:31:00 +00:00
Feature Expose "noduplicate" attribute as a property for intrinsics. 2014-03-18 23:51:07 +00:00
FileCheck
Instrumentation Set debug info for instructions inserted in SplitBlockAndInsertIfThen. 2014-03-19 12:56:38 +00:00
Integer
JitListener
Linker Switch the type field in DIVariable and DIGlobalVariable over to DITypeRefs. 2014-03-18 02:34:58 +00:00
LTO Module: Don't rename in getOrInsertFunction() 2014-03-10 23:42:28 +00:00
MC Look through variables when computing relocations. 2014-03-20 02:12:01 +00:00
Object Object: Provide a richer means of describing auxiliary symbols 2014-03-19 04:47:47 +00:00
Other [PM] Wire up the Verifier for the new pass manager and connect it to the 2014-01-20 11:34:08 +00:00
TableGen [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses 2014-01-02 20:47:09 +00:00
tools llvm-profdata: Make "merge" into a subcommand. 2014-03-19 02:20:46 +00:00
Transforms Fix use_iterator crash in ObjCArc from r203364 2014-03-18 22:32:43 +00:00
Unit With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00
Verifier Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
YAMLParser
.clang-format
CMakeLists.txt [CMake] check-llvm: Include "bugpoint" in dependent list. 2014-03-04 16:13:30 +00:00
lit.cfg PGO: llvm-profdata: tool for merging profiles 2014-02-17 23:22:49 +00:00
lit.site.cfg.in Eliminate inappropriate use of FindProgramByName() from lli 2014-01-22 21:52:35 +00:00
Makefile With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00
Makefile.tests
TestRunner.sh