This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Segmentation Fault with bfd_abs_section_ptr
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: Pierre Mallard <pierremallard at yahoo dot fr>
- Cc: binutils at sources dot redhat dot com
- Date: 11 Jul 2002 12:07:32 +0100
- Subject: Re: Segmentation Fault with bfd_abs_section_ptr
- References: <20020709150554.16171.qmail@web20302.mail.yahoo.com>
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