This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Segmentation Fault with bfd_abs_section_ptr


Hi Pierre,

> It appears that I go throw bfd_make_section_old_way of
> section.c and exit at :
>      if (strcmp (name, BFD_ABS_SECTION_NAME) == 0)
>           return bfd_abs_section_ptr;
> but bfd_abs_section_ptr->output_section is 0x0 where
> as in the 32 bit version it's already equal to
> bfd_abs_section_ptr...
> 
> So the problem might be in the instanciation of
> bfd_abs_section_ptr that I can't found...
> Can someone help me?

bfd_abs_section_ptr is created in bfd/section.c.  Have a look for the
STD_SECTION macro.  If this macro is failing to initialise the
output_section field of asection structure then there is a probably a
bug somewhere in your conversion of 32bit code to 64bit, so that it is
actually setting an earlier field in the structure (because it was
using a 32-bit field instead of a 64-bit wide field).

I would suggest running the program inside a debugger and then when
the seg fault occurs, printing out the entire contents of the
bfd_abs_section_ptr structure.  Have a look at the fields and try to
work out where the mis-initialisation occurs.

Cheers
        Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]