[PATCH, MIPS] Better diagnostic on incorrect size for .reginfo
Thiemo Seufer
ths@networkno.de
Tue Aug 14 20:45:00 GMT 2007
Adam Nemet wrote:
> This is fairly easy to trigger with a custom linker script and we
> print an assert. I am changing this into a hopefully more descriptive
> error message.
>
> Here is for example what one of our customers was doing:
>
> SECTIONS
> {
> .text ALIGN(4) : { *(.text) }
> .data ALIGN(8) : { *(.data) }
> .reginfo . : { *(.reginfo) }
> }
>
> (Note the dot after .reginfo.) .reginfo is 8-byte aligned on n32. If
> dot is not aligned before .reginfo, the start of the section is set to
> the unaligned address and then padding is added which increases the
> size of the output section.
Convert this description to a testcase and add it to the ld testsuite. :-)
> After the patch there is a slight change in behavior because
> BFD_ASSERT allows the linking to continue whereas I make it fail now.
> I would think this is better.
>
> OK?
>
> Adam
>
> * elfxx-mips.c (_bfd_mips_elf_final_link): Report error instead of
> BFD_ASSERT if size of .reginfo is incorrect.
Otherwise this looks good.
Thiemo
More information about the Binutils
mailing list