[llvm] r185389 - PR16493: DebugInfo with TLS on PPC crashing due to invalid relocation
Ulrich Weigand
Ulrich.Weigand at de.ibm.com
Mon Jul 1 17:23:48 PDT 2013
David Blaikie <dblaikie at gmail.com> wrote:
> Restrict the current TLS support to X86 ELF for now. Test that we don't
> produce it on PPC & we can flesh that test case out with the right thing
> once someone implements it.
I've now added the missing relocation types. However, I'm not sure how
to implement the rest of the TLS DWARF support, because on PowerPC, we
need to add a bias of 0x8000 to the @dtprel value. GCC outputs assembler
code along these lines:
.uleb128 0x2 # (DIE (0x2d) DW_TAG_variable)
.ascii "x\0" # DW_AT_name
.byte 0x1 # DW_AT_decl_file (test.c)
.byte 0x2 # DW_AT_decl_line
.4byte 0x42 # DW_AT_type
.byte 0x1 # DW_AT_external
.byte 0xa # DW_AT_location
.byte 0x3 # DW_OP_addr
.quad x at dtprel+0x8000
.byte 0xe0 # DW_OP_GNU_push_tls_address
I'm not sure how to represent the +0x8000, since the
getDebugThreadLocalSymbol
routine must return a plain MCExprSymbolRef.
Could this be changed to a full MCExpr, or at least allow
symbol + offset ?
Bye,
Ulrich
More information about the llvm-commits
mailing list