This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH, MIPS] Better diagnostic on incorrect size for .reginfo
- From: Thiemo Seufer <ths at networkno dot de>
- To: Adam Nemet <anemet at caviumnetworks dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 14 Aug 2007 21:16:50 +0100
- Subject: Re: [PATCH, MIPS] Better diagnostic on incorrect size for .reginfo
- References: <18113.65029.906408.191603@localhost.localdomain>
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