This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Relaxing a h8300 target debugginginformation.
- To: binutils at sourceware dot cygnus dot com
- Subject: Relaxing a h8300 target debugginginformation.
- From: Paul Clarke <paulc at senet dot com dot au>
- Date: Sat, 15 Jul 2000 14:15:43 +0000
When relaxing a h8300 target the code is relaxed but the debugging
information
is not. The following is my attempt to fix the problem BUT it does
not
work. Is the idea right but implemented wrong or what?
bfd/reloc16.c
void
bfd_perform_slip (abfd, slip, input_section, value)
bfd *abfd;
unsigned int slip;
asection *input_section;
bfd_vma value;
{
asymbol **s;
s = _bfd_generic_link_get_symbols (abfd);
BFD_ASSERT (s != (asymbol **) NULL);
/* Find all symbols past this point, and make them know
what's happened. */
while (*s)
{
asymbol *p = *s;
if (p->section == input_section)
{
/* This was pointing into this section, so mangle it. */
if (p->value > value)
{
+ alent *line;
+
+ p->value -= slip;
+ line = coff_get_lineno(abfd, p);
+ if (line) line->u.offset -= slip;
+
if (p->udata.p != NULL)
{
struct generic_link_hash_entry *h;
h = (struct generic_link_hash_entry *)p->udata.p;
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak);
h->root.u.def.value -= slip;
BFD_ASSERT (h->root.u.def.value == p->value);
}
}
}
s++;
}
}