This is the mail archive of the binutils@sourceware.org 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: [PATCH, MIPS] Better diagnostic on incorrect size for .reginfo


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


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