Merge pull request #20 from pimanttr/use-libc++abi

I can catch exceptions
Add math library back in because of nodefaultlibs. Also move the nodefaultlibs flag earlier so its more clear.

Change-Id: I8e189f86af352b49d1b8c34a97741a5915c30e8b
Merge pull request #24 from awong-dev/add_-lm

Add math library back in because of nodefaultlibs. Also move the nodefau...
Fix warnings, add missing return, and make compile on llvm 3.4.

Not sure why the nested template in a local struct is disallowed on
clang 3.4, but the simple workaround is to hoist the type out of hte
local scope into the file namespace.

The missing return also fixes the SIGILL caused during exception
handling.

Change-Id: I825577409bdd33c410368de666ba69fe1bb2e21e
Add ehabi flags when using llvm-3.4.

llvm-3.3 doesn't support emitting ehabi descriptor tables.
If using a bleeding edge 3.4 toolchain, add flags for these descriptors.

Change-Id: I8f1996035465dc6ca795c0cec0c462a534c28165
Remove Bsymbolic and change nostdblib to nodefaultlibs.

Bsymbolic causes problems with exception handling as well as new
overriding. nostdlib is too big of a hammer. nodefaultlibs is better.

Change-Id: I14bc6b9a0d902e8c93589beb3439dd90db945b39
Fix warning when including both ctype and xlocale

Change-Id: Ieee84503445770de4dd2a2004282c5c5056f790f
Rename fields so it's clear when we are looking at the index table versus exception table.

Change-Id: I024b94d7675f6209f2f7b1b74e413b5bc8561410
redo table decoding logic to match ehabi. the previous code looked like dwarf?

Change-Id: Ia65503e94c7a91c100482613206f1811b7fc5b8d
Merge pull request #27 from awong-dev/ehabi-descriptor

Ehabi descriptor
Style nits

Change-Id: Ic2e39f13360bea22642ea896a03e66388dbdc204
Allow LLVM version >= 3.4 to use arm EHABI flags

Change-Id: I59bd27189b049396cd02bde3ed715d000ed635b9
Merge pull request #29 from awong-dev/ehabi-simple

Here's some hopefully simple changes (ie not c++ code)
Don't set format in the info object, it is not needed/used for us

Change-Id: Ie88bdeb4f9f0bd94e2b0cc145497f70769217463
Merge pull request #31 from awong-dev/rm-format

Don't set format in the info object, it is not needed/used for us
Find the language-specific data address in all cases

The spec seems to say the data will come after the personality function inside
the exception handler table:

"""
Conceptually, an exception-handling table entry begins with the address of the personality routine:
/* See §7.2 for details of the various _Unwind types */
typedef _Unwind_Reason_Code (*PersonalityRoutine)(_Unwind_State, _Unwind_Control_Block *, _Unwind_Context *);
struct _Unwind_EHT_Entry {
  PersonalityRoutine pr;
  /* then other data understood only by the personality routine */
};
"""

Change-Id: I2f8f32e39159f030c2b98ae7a8757ad216eeff18
Merge pull request #30 from awong-dev/lsda

Find the language-specific data address in all cases
Hack to add logbl forwarding so llvm-3.4's compiler-rt can link.

Change-Id: Ia68633591243492152656e856188a570187a327d
Merge pull request #32 from awong-dev/logbl-hack

Hack to add logbl forwarding so llvm-3.4's compiler-rt can link.
Redefine semantics of lsda for pr0,1,2 functions. Not sure this is right but it seems more consistent

Change-Id: I2317b0a9b1bc9a8627b8be77131fa885e6f7e579