llvm-6502/include/llvm
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
..
ADT When destroying a StringMap, just iterate over the map and destroy the contained elements. Don't reset them back to 0 as their values aren't needed any more. This results in ~StringMap() being mostly empty for POD types in BumpPtrAllocators 2014-03-19 00:23:30 +00:00
Analysis Remove copy ctors that did the same thing as the default one. 2014-03-11 11:32:49 +00:00
AsmParser
Bitcode Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
CodeGen Really REALLY finish adding const to the MachineRegisterInfo iterator range methods. 2014-03-17 19:34:51 +00:00
Config static link polly into tools 2014-03-14 04:04:14 +00:00
DebugInfo Revert "Clean up SmallString a bit" 2014-03-09 06:22:58 +00:00
ExecutionEngine Untabify. 2014-03-16 23:58:43 +00:00
IR Expose "noduplicate" attribute as a property for intrinsics. 2014-03-18 23:51:07 +00:00
IRReader
LineEditor Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
Linker [Layering] Sink Linker.h into a Linker subdirectory to make it 2014-03-06 03:42:23 +00:00
LTO Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
MC Look through variables when computing relocations. 2014-03-20 02:12:01 +00:00
Object COFF: Fix a typo 2014-03-19 20:16:23 +00:00
Option
Support Support: Add postincrement and include guards to LineIterator 2014-03-19 22:58:31 +00:00
TableGen
Target [TableGen] Optionally forbid overlap between named and positional operands 2014-03-13 07:57:54 +00:00
Transforms [msan] Origin tracking with history. 2014-03-18 13:30:56 +00:00
CMakeLists.txt
InitializePasses.h
LinkAllIR.h
LinkAllPasses.h
Pass.h
PassAnalysisSupport.h
PassManager.h
PassRegistry.h
PassSupport.h