llvm-6502/lib/MC
Rafael Espindola fb118bd226 Compute A-B when A or B is weak.
Similar to r235222, but for the weak symbol case.

In an "ideal" assembler/object format an expression would always refer to the
final value and A-B would only be computed from a section in the same
comdat as A and B with A and B strong.

Unfortunately that is not the case with debug info on ELF, so we need an
heuristic.  Since we need an heuristic, we may as well use the same one as
gas:

* call weak_sym : produces a relocation, even if in the same section.
* A - weak_sym and weak_sym -A: don't produce a relocation if we can
  compute it.

This fixes pr23272 and changes the fix of pr22815 to match what gas does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235227 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-17 21:15:17 +00:00
..
MCDisassembler Replace the MCSubtargetInfo parameter with a Triple when creating 2015-03-31 00:10:04 +00:00
MCParser Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
ConstantPools.cpp [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
ELFObjectWriter.cpp Compute A-B when A or B is weak. 2015-04-17 21:15:17 +00:00
LLVMBuild.txt Nuke MCAnalysis. 2014-09-02 22:32:20 +00:00
MachObjectWriter.cpp Compute A-B when A or B is weak. 2015-04-17 21:15:17 +00:00
Makefile Nuke MCAnalysis. 2014-09-02 22:32:20 +00:00
MCAsmBackend.cpp Simplify a really complicated check for Arch == X86_64. 2014-03-11 21:22:57 +00:00
MCAsmInfo.cpp [NVPTXAsmPrinter] do not print .align on function headers 2015-03-12 01:50:30 +00:00
MCAsmInfoCOFF.cpp Remove HasLEB128. 2014-08-15 14:01:07 +00:00
MCAsmInfoDarwin.cpp Remove MCStreamer include which isn't used here. NFC 2015-03-04 01:24:26 +00:00
MCAsmInfoELF.cpp Compute the ELF SectionKind from the flags. 2015-01-29 17:33:21 +00:00
MCAsmStreamer.cpp Simplify use of formatted_raw_ostream. 2015-04-09 21:06:08 +00:00
MCAssembler.cpp Compute A-B when A or B is weak. 2015-04-17 21:15:17 +00:00
MCCodeEmitter.cpp
MCCodeGenInfo.cpp
MCContext.cpp Store the sh_link of ARM_EXIDX directly in MCSectionELF. 2015-04-06 04:25:18 +00:00
MCDwarf.cpp Change range-based for-loops to be -Wrange-loop-analysis clean. 2015-04-15 01:21:15 +00:00
MCELF.cpp Add STB_GNU_UNIQUE to the ELF writer. 2015-01-23 04:44:35 +00:00
MCELFObjectTargetWriter.cpp Re-enable target-specific relocation table sorting and use it for Mips 2015-04-14 13:23:34 +00:00
MCELFStreamer.cpp Use raw_pwrite_stream in the object writer/streamer. 2015-04-14 22:14:34 +00:00
MCExpr.cpp MC: For variable symbols, maintain MCSymbol::Section as a cache. 2015-04-03 01:46:11 +00:00
MCInst.cpp Fixup. 2015-02-05 01:13:47 +00:00
MCInstPrinter.cpp Format: Modernize using variadic templates. 2015-02-15 22:15:41 +00:00
MCInstrAnalysis.cpp MC: Disassembled CFG reconstruction. 2013-05-24 01:07:04 +00:00
MCLabel.cpp
MCLinkerOptimizationHint.cpp This file should always have included MCAssembler and not MCStreamer. NFC 2015-03-04 01:24:24 +00:00
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp Use raw_pwrite_stream in the object writer/streamer. 2015-04-14 22:14:34 +00:00
MCNullStreamer.cpp Remove method that is identical to the base class one. 2014-10-14 17:38:38 +00:00
MCObjectFileInfo.cpp Don't print labels that on ELF are never used. 2015-03-11 04:20:31 +00:00
MCObjectStreamer.cpp Use raw_pwrite_stream in the object writer/streamer. 2015-04-14 22:14:34 +00:00
MCObjectWriter.cpp Compute A-B when A or B is weak. 2015-04-17 21:15:17 +00:00
MCRegisterInfo.cpp Make SubRegIndex size mandatory, following r183020. 2013-05-31 23:45:26 +00:00
MCSection.cpp Refactor how passes get a symbol at the end of a section. 2015-03-23 21:22:04 +00:00
MCSectionCOFF.cpp MC: Emit COFF section flags in the "proper" order 2015-02-07 08:26:40 +00:00
MCSectionELF.cpp Use a comma after the unique keyword. 2015-04-06 16:34:41 +00:00
MCSectionMachO.cpp Implement unique sections with an unique ID. 2015-04-04 18:02:01 +00:00
MCStreamer.cpp Implement unique sections with an unique ID. 2015-04-04 18:02:01 +00:00
MCSubtargetInfo.cpp Don't print an error message when looking up the scheduling model if user specified -mcpu=help. 2015-04-02 04:27:50 +00:00
MCSymbol.cpp Move AliasedSymbol to MachObjectWriter. 2015-04-17 12:28:43 +00:00
MCSymbolizer.cpp Move MCSymbolizer's constructor into header. It's trivial - there's no need for 2014-03-27 02:42:52 +00:00
MCTargetOptions.cpp Migrate ABIName to MCTargetOptions so that it can be shared between 2015-01-14 00:50:31 +00:00
MCValue.cpp Try to fix the build in MCValue.cpp 2015-02-05 01:23:14 +00:00
MCWin64EH.cpp MC Win64: Put unwind info for COMDAT code into the same COMDAT group 2014-09-04 17:42:03 +00:00
MCWinEH.cpp Remove MCStreamer.h include from MCContext.h and explictly include it where necessary. NFC 2015-03-04 01:24:11 +00:00
StringTableBuilder.cpp MachObjectWriter: optimize the string table for common suffices 2014-10-06 17:05:19 +00:00
SubtargetFeature.cpp Make llc use getHostCPUFeatures when 'native' is specified for cpu. 2015-03-31 05:52:57 +00:00
WinCOFFObjectWriter.cpp Compute A-B when A or B is weak. 2015-04-17 21:15:17 +00:00
WinCOFFStreamer.cpp Use raw_pwrite_stream in the object writer/streamer. 2015-04-14 22:14:34 +00:00
YAML.cpp Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00