This is the mail archive of the 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: compatibility of (mips ELF) .o files between binutils versions?

Hi Chris,

> What's the expected ability of releases of binutils to deal with .o
> files generated by previous relases?

In general the binutils should be backwards compatible with earlier
releases.  So a newer release definitely ought to be able to handle
binaries produced by an earlier release.  There are exceptions to this
rule, but they are not common.

> I ran into a problem w/ compatibility of objects from 2.11.2 to 2.12.1
> with mips-elf target, with what i'd _expect_ to be very simple inputs:
>         .data
> bar:
>         .word bar
> built like:
> ../inst-2.11.2/bin/mips-elf-as -o a.o foo.s
> ../inst-2.12.1/bin/mips-elf-ld -o b.o -r a.o
> the link crashes like:
> ../inst-2.12.1/bin/mips-elf-ld: BFD 2.12.1 assertion fail elflink.h:6287
> Segmentation fault (core dumped)

Well this is definitely a bug.  The linker should never seg fault.  At
the very least it should produce an intelligible error message and

> Should this be expected to work?  Is it worth debugging, given that
> things work just fine if assembly and linking happens w/ the same
> version of the tools?

Well it might be a problem specific to the MIPS port, but even so the
linker should not seg fault.  It is definitely worth investigating.

> (I'm not really sure where to even begin debugging this...)

It appears to be a problem with the relocs.  What does 'objdump -r'
show for the 2.11.2 assembled binary vs the 2.12.1 assembled binary ?


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