On Mon, Sep 27, 2010 at 05:29:19PM -0700, Richard Henderson wrote: > The 64-bit PEI format has a SECREL32 relocation type. It > does not, however, have a SECREL64 relocation type. Which > means that for > > > #define DWARF_REF_SIZE \ > > (dwarf_version == 2 ? DWARF2_ADDR_SIZE : DWARF_OFFSET_SIZE) > > we don't really have something to use for for dwarf2. > > I could fake it with > > .secrel32 ref > .long 0
This is something we already use for TLS on x86_64: .byte 0xa # DW_AT_location .byte 0xe # DW_OP_const8u .long i...@dtpoff, 0 At least for relocations that are always resolved to locations within the same .debug_info section they will be always unsigned and thus using .secrel 32 ref; .long 0 is IMHO just fine, and implicit pointer currently will never reference anything outside of the current executable's or shared library's CU. Other alternative would be e.g. to have some macro to protect uses of DW_FORM_ref_addr/DW_OP_GNU_implicit_pointer/DW_OP_call_ref, which by default would be to enable them e.g. for (dwarf_version >= 3 || !dwarf_strict) and targets like this could restrict them to (dwarf_version >= 3). Jakub