This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: A little help with JIT support
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Rouslan Korneychuk <rouslank at msn dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 1 May 2013 16:34:26 +0200
- Subject: Re: A little help with JIT support
- References: <BAY171-W10A17ECD8345F36595337FD6B30 at phx dot gbl>
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.
Jan