[PATCH] Make debug info section relative on IA64

Richard Henderson rth@redhat.com
Fri Feb 28 19:34:00 GMT 2003


On Fri, Feb 28, 2003 at 10:46:51AM -0800, Steve Ellcey wrote:
> Hmm, any chance of some more help on this?  I haven't done a lot of work
> in gas/binutils so I am not sure what the dwarf2 bit is or where I would
> set it or what I would set it to.

In gas/dwarf2dbg.c there are bits like this:

  /* Offset to .debug_info.  */
  expr.X_op = O_symbol;
  expr.X_add_symbol = section_symbol (info_seg);
  expr.X_add_number = 0;
  emit_expr (&expr, 4);

This pattern would need to be replaced by a target hook, e.g.
TC_DWARF2_EMIT_OFFSET (symbol, size).  For non-ia64, just pull
the above out into a small function in dwarf2dbg.c.  For ia64,
you'd use

      expr.X_op = O_pseudo_fixup;
      expr.X_op_symbol = pseudo_func[FUNC_SEG_RELATIVE].u.sym;
      expr.X_add_number = 0;
      expr.X_add_symbol = symbol;

Also worth fixing here is the mish-mash of the use of "4" 
and "sizeof_offset".


r~



More information about the Binutils mailing list