llvm-6502/lib/CodeGen/AsmPrinter
Oliver Stannard b63d71ef81 Emit .eh_frame with relocations to functions, rather than sections
When LLVM emits DWARF call frame information, it currently creates a local,
section-relative symbol in the code section, which is pointed to by a
relocation on the .eh_frame section. However, for C++ we emit some functions in
section groups, and the SysV ABI has some rules to make it easier to remove
these sections
(http://www.sco.com/developers/gabi/latest/ch4.sheader.html#section_group_rules):

  A symbol table entry with STB_LOCAL binding that is defined relative to one
  of a group's sections, and that is contained in a symbol table section that is
  not part of the group, must be discarded if the group members are discarded.
  References to this symbol table entry from outside the group are not allowed.

This means that we need to use the function symbol for the relocation, not a
temporary symbol.

There was a comment in the code claiming that the local symbol was used to
avoid creating a relocation, but a relocation must be created anyway as the
code and CFI are in different sections.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221150 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 12:02:51 +00:00
..
AddressPool.cpp
AddressPool.h
ARMException.cpp Emit .eh_frame with relocations to functions, rather than sections 2014-11-03 12:02:51 +00:00
AsmPrinter.cpp Fix a bit of confusion about .set and produce more readable assembly. 2014-10-21 01:17:30 +00:00
AsmPrinterDwarf.cpp
AsmPrinterHandler.h
AsmPrinterInlineAsm.cpp [asan-assembly-instrumentation] Added CFI directives to the generated instrumentation code. 2014-09-10 09:45:49 +00:00
ByteStreamer.h
CMakeLists.txt Move DwarfCompileUnit from DwarfUnit.h to its own header (DwarfCompileUnit.h) 2014-10-04 15:49:50 +00:00
DbgValueHistoryCalculator.cpp DbgValueHistoryCalculator: Store modified registers in a BitVector instead of std::set. 2014-10-06 15:31:04 +00:00
DbgValueHistoryCalculator.h
DebugLocEntry.h Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
DebugLocList.h
DIE.cpp Make AsmPrinter::EmitLabelOffsetDifference a static helper and simplify. 2014-10-21 00:25:49 +00:00
DIE.h Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already. 2014-08-30 16:48:02 +00:00
DIEHash.cpp Fix typos in comments, NFC 2014-08-29 21:53:01 +00:00
DIEHash.h
DwarfAccelTable.cpp Remove the unused string section symbol parameter from DwarfFile::emitStrings 2014-09-11 21:12:48 +00:00
DwarfAccelTable.h Remove the unused string section symbol parameter from DwarfFile::emitStrings 2014-09-11 21:12:48 +00:00
DwarfCFIException.cpp Emit .eh_frame with relocations to functions, rather than sections 2014-11-03 12:02:51 +00:00
DwarfCompileUnit.cpp Add DwarfUnit::isDwoUnit and use it to generalize string creation 2014-11-02 08:51:37 +00:00
DwarfCompileUnit.h Sink range list handling down from DwarfUnit into its only use, in DwarfCompileUnit. 2014-11-03 02:41:49 +00:00
DwarfDebug.cpp Formatting 2014-11-02 08:52:37 +00:00
DwarfDebug.h DebugInfo: Sink accelerator table lists down (GlobalNames/Types) into DwarfCompileUnit 2014-11-02 06:16:39 +00:00
DwarfException.h CodeGen: split out the Win64Exception emitter 2014-09-01 23:48:34 +00:00
DwarfFile.cpp Sink dwarf unit length emission down into DwarfUnit::emitHeader 2014-11-01 23:59:23 +00:00
DwarfFile.h Sink DwarfDebug::AbstractSPDies down into DwarfFile 2014-11-01 17:21:26 +00:00
DwarfStringPool.cpp Remove the unused string section symbol parameter from DwarfFile::emitStrings 2014-09-11 21:12:48 +00:00
DwarfStringPool.h Remove the unused string section symbol parameter from DwarfFile::emitStrings 2014-09-11 21:12:48 +00:00
DwarfUnit.cpp Add DwarfUnit::isDwoUnit and use it to generalize string creation 2014-11-02 08:51:37 +00:00
DwarfUnit.h Sink range list handling down from DwarfUnit into its only use, in DwarfCompileUnit. 2014-11-03 02:41:49 +00:00
EHStreamer.cpp
EHStreamer.h
ErlangGCPrinter.cpp
LLVMBuild.txt
Makefile
OcamlGCPrinter.cpp
Win64Exception.cpp CodeGen: split out the Win64Exception emitter 2014-09-01 23:48:34 +00:00
Win64Exception.h CodeGen: split out the Win64Exception emitter 2014-09-01 23:48:34 +00:00
WinCodeViewLineTables.cpp Fix PR21189 -- Emit symbol subsection required to debug LLVM-built binaries with VS2012+ 2014-10-24 01:27:45 +00:00
WinCodeViewLineTables.h