llvm-6502/include/llvm/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
..
MCParser Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
ConstantPools.h Remove empty non-virtual destructors or mark them =default when non-public 2015-04-11 15:32:26 +00:00
MachineLocation.h
MCAsmBackend.h Use raw_pwrite_stream in the object writer/streamer. 2015-04-14 22:14:34 +00:00
MCAsmInfo.h
MCAsmInfoCOFF.h
MCAsmInfoDarwin.h
MCAsmInfoELF.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
MCAsmLayout.h [MC] Write padding into fragments when -mc-relax-all flag is used 2015-04-12 23:42:25 +00:00
MCAssembler.h [MC] Write padding into fragments when -mc-relax-all flag is used 2015-04-12 23:42:25 +00:00
MCCodeEmitter.h
MCCodeGenInfo.h
MCContext.h
MCDirectives.h
MCDisassembler.h
MCDwarf.h
MCELF.h
MCELFObjectWriter.h Use raw_pwrite_stream in the object writer/streamer. 2015-04-14 22:14:34 +00:00
MCELFStreamer.h Update MCELFStreamer::reset() following r234714 2015-04-16 10:53:22 +00:00
MCELFSymbolFlags.h
MCExpr.h
MCExternalSymbolizer.h
MCFixedLenDisassembler.h
MCFixup.h
MCFixupKindInfo.h
MCInst.h
MCInstBuilder.h
MCInstPrinter.h
MCInstrAnalysis.h
MCInstrDesc.h
MCInstrInfo.h
MCInstrItineraries.h
MCLabel.h
MCLinkerOptimizationHint.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
MCMachObjectWriter.h Compute A-B when A or B is weak. 2015-04-17 21:15:17 +00:00
MCMachOSymbolFlags.h
MCObjectFileInfo.h
MCObjectStreamer.h Use raw_pwrite_stream in the object writer/streamer. 2015-04-14 22:14:34 +00:00
MCObjectWriter.h Compute A-B when A or B is weak. 2015-04-17 21:15:17 +00:00
MCRegisterInfo.h
MCRelocationInfo.h
MCSchedule.h
MCSection.h
MCSectionCOFF.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
MCSectionELF.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
MCSectionMachO.h
MCStreamer.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
MCSubtargetInfo.h
MCSymbol.h Move AliasedSymbol to MachObjectWriter. 2015-04-17 12:28:43 +00:00
MCSymbolizer.h
MCTargetAsmParser.h Remove empty non-virtual destructors or mark them =default when non-public 2015-04-11 15:32:26 +00:00
MCTargetOptions.h
MCTargetOptionsCommandFlags.h
MCValue.h
MCWin64EH.h
MCWinCOFFObjectWriter.h Use raw_pwrite_stream in the object writer/streamer. 2015-04-14 22:14:34 +00:00
MCWinCOFFStreamer.h Use raw_pwrite_stream in the object writer/streamer. 2015-04-14 22:14:34 +00:00
MCWinEH.h
SectionKind.h
StringTableBuilder.h
SubtargetFeature.h
YAML.h