nonzero offset ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

nonzero offset ?

Balint Cristian

Hi !

        I working on a cpu target, but unfortunaltely without these lines in info_to_howto_rel
things not relocate correctly:


      asymbol *s = *(cache_ptr->sym_ptr_ptr);
  if(ELF_R_SYM(dst->r_info) && (s->flags & BSF_SECTION_SYM))
      cache_ptr->sym_ptr_ptr = s->section->symbol_ptr_ptr;

Is thes correct/normal ?

I ask your advice where I am wrong, using this [exerpt from old patch during 2004-Dec],
evrithing started to work.



Now function  looks like:
static void
or32_info_to_howto_rel (abfd, cache_ptr, dst)
     bfd *abfd ATTRIBUTE_UNUSED;
     arelent *cache_ptr;
     Elf_Internal_Rela *dst;
{
  unsigned int r_type;

  r_type = ELF32_R_TYPE (dst->r_info);
  BFD_ASSERT (r_type < (unsigned int) R_OR32_max);
  cache_ptr->howto = &elf_or32_howto_table[r_type];

      asymbol *s = *(cache_ptr->sym_ptr_ptr);
  if(ELF_R_SYM(dst->r_info) && (s->flags & BSF_SECTION_SYM))
      cache_ptr->sym_ptr_ptr = s->section->symbol_ptr_ptr;

}

Where to dig to get rid ?