llvm-6502/lib
Kevin Enderby 4f066b6db8 The integrated darwin assembler can hang in an infinite loop (or get an assert
with a debug build) with this buggy .indirect_symbol directive usage:

% cat test.s
x: .indirect_symbol _y

The assertion is because it is trying to get the symbol index for the
symbol _y when it is writing out the indirect symbol table. This line of
code in MachObjectWriter::WriteObject() :

        Write32(Asm.getSymbolData(*it->Symbol).getIndex());

And while there is a symbol _y it does not have any getSymbolData set which
is only done in MachObjectWriter::BindIndirectSymbols() for pointer sections
or stub sections.  I added a check and an error in there to catch this in case
something slips through.

But to get a better error the parser should detect when a .indirect_symbol
directive is used and it is not in a pointer section or stub section.  To make
that work I moved the handling of the indirect symbol out of the target
independent AsmParser code into the DarwinAsmParser code that can check
for the proper Mach-O section types.

rdar://14825505


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189497 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28 17:50:59 +00:00
..
Analysis Fix lint assert on integer vector division 2013-08-26 23:29:33 +00:00
AsmParser Add function attribute 'optnone'. 2013-08-23 11:53:55 +00:00
Bitcode Add function attribute 'optnone'. 2013-08-23 11:53:55 +00:00
CodeGen Remove support for the .debug_inlined section. No known software 2013-08-28 04:04:28 +00:00
DebugInfo Add support for DebugFission to DWARF parser 2013-08-27 09:20:22 +00:00
ExecutionEngine Fix the build issue under ia64. Close bug #5715 2013-08-27 06:49:46 +00:00
IR PR16995: DebugInfo: Don't overwrite existing member lists when adding template arguments 2013-08-28 17:28:16 +00:00
IRReader Add 'const' qualifiers to static const char* variables. 2013-07-16 01:17:10 +00:00
Linker Extend RemapInstruction and friends to take an optional new parameter, a ValueMaterializer. 2013-05-28 15:17:05 +00:00
MC The integrated darwin assembler can hang in an infinite loop (or get an assert 2013-08-28 17:50:59 +00:00
Object Revert "Fix the build broken by r189315." and "Move everything depending on Object/MachOFormat.h over to Support/MachO.h." 2013-08-27 05:38:30 +00:00
Option Revert "Option parsing: support case-insensitive option matching." as it broke Windows buildbot. 2013-08-28 00:02:06 +00:00
Support Revert r189442 "Change default # of digits for APFloat::toString" 2013-08-28 06:21:46 +00:00
TableGen Add an error check for a typo I accidentally made in a td file that caused an assert to fire. 2013-08-20 04:22:09 +00:00
Target [ARMv8] 2013-08-28 16:39:20 +00:00
Transforms 80 cols 2013-08-28 11:25:12 +00:00
CMakeLists.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
LLVMBuild.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
Makefile Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00