[Dwarf-Discuss] .debug_frame and the base address

Michael Eager eager@eagercon.com
Mon Sep 24 17:46:25 GMT 2018


On 09/24/2018 09:19 AM, Robert Harris via Dwarf-Discuss wrote:
>> But in general, yes, any DWARF expression that contains a DW_OP_addr might need a relocation for its address argument.
 >
> Are you aware of where in the standard this is documented?  It sounds reasonable
> but I'm returning to this after a long time and I don't remember my way around as
> well as I used to.

DW_OP_addr is described in Section 2.5.1.1 of the DWARF 5 Standard:

   2. DW_OP_addr

      The DW_OP_addr operation has a single operand that encodes a
      machine address and whose size is the size of an address on the
      target machine.

The most common way in which the machine address is provided as the 
operand is by generating a relocatable value pointing to the target 
address.  This is not really a DWARF specification; it is how 
relocations work in assemblers and linkers.

-- 
Michael Eager    eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306



More information about the Dwarf-discuss mailing list