This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: A little help with JIT support
- From: Rouslan Korneychuk <rouslank at msn dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 1 May 2013 18:52:48 -0400
- Subject: RE: A little help with JIT support
- References: <BAY171-W10A17ECD8345F36595337FD6B30 at phx dot gbl>,<20130501143426 dot GA7081 at host2 dot jankratochvil dot net>
On Wed, 01 May 2013 16:34:26 +0200, Jan Kratochvil wrote:
> On Wed, 01 May 2013 01:05:01 +0200, Rouslan Korneychuk wrote:
> > Are the addresses in an in-memory object file supposed to be absolute addresses?
>
> According to GDB's jit.c jit_bfd_try_read_symtab yes:
>
> /* Read the section address information out of the symbol file. Since the
> file is generated by the JIT at runtime, it should all of the absolute
> addresses that we care about. */
> +
> /* We assume that these virtual addresses are absolute, and do not
> treat them as offsets. */
> sai->other[i].addr = bfd_get_section_vma (nbfd, sec);
>
> When you generate it at runtime it should not matter much IMO, instead of
> relocating it in GDB you can already relocate it yourself while generating the
> symbol file at runtime.
Ah, thank you.