[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] [BINUTILS] 2.16.1howto
Le Wed, 17 Aug 2005 11:24:11 +0200
Patrice Mandin <mandin.patrice@wanadoo.fr> a écrit:
> > m68k-atari-mint-ld: BFD 2.16.1 internal error, aborting at
> > ../../binutils-2.16.1-new/bfd/aoutx.h line 5057 in
> > aout_link_input_section_std
> >
> > The part of aoutx.h file related to this:
> >
> > --8<--8<--8<--
> > if (r != bfd_reloc_ok)
> > {
> > switch (r)
> > {
> > default:
> > case bfd_reloc_outofrange:
> > abort (); /* this is line 5057 that abort linking */
> > case bfd_reloc_overflow:
> > --8<--8<--8<--
> >
> > The r variable is setup at various stages before this line, so this
> > is a problem with relocation stuff in prg-mint.c.
>
> More investigation, in prg-mint.c::
>
> The problem arises in m68kmint_prg_final_link_relocate () function, at
> start, where address is checked against input_section->rawsize.
> This value is NULL, hence the error.
>
> The asection structure type is defined in bfd/bfd-in2.h. There are 2
> size related fields:
>
> --8<--8<--8<--
> /* The size of the section in octets, as it will be output.
> Contains a value even if the section has no contents (e.g., the
> size of <<.bss>>). */
> bfd_size_type size;
>
> /* For input sections, the original size on disk of the section, in
> octets. This field is used by the linker relaxation code. It is
> currently only set for sections where the linker relaxation
> scheme doesn't cache altered section and reloc contents (stabs,
> eh_frame, SEC_MERGE, some coff relaxing targets), and thus the
> original size needs to be kept to read the section multiple
> times. For output sections, rawsize holds the section size
> calculated on a previous linker relaxation pass. */
> bfd_size_type rawsize;
> --8<--8<--8<--
>
> I'll have to check in previous binutils if those both fields where
> also present. Maybe we should use size instead of rawsize?
The structure is quite the same, only fields have changed in size.
However, most other aout drivers initialize rawsize, and prg-mint.c does
not, so I think this is the source of my problems.
Now I need to know where I should initialize it. Anyone can help.
--
Patrice Mandin
WWW: http://membres.lycos.fr/pmandin/
Programmeur Linux, Atari
Spécialité: Développement, jeux