This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] arc/bfd: Fix segfault from debug code, and disable debug by default
Thank you for the contribution. ;-)
On 07/15/2016 12:59 PM, Nick Clifton wrote:
> Hi Cupertino,
>> Thank you for the patch, however neither me or Claudiu agree with
>> reverting the overflow information printing.
>> Overflow information printing is a basic need for the user to identify
>> linking/compiling problems.
> True - but the way that it was being done was not really the "binutils way".
>> Until now we were unable to tight this up. Unfortunately, we have other
>> more important issues/problems to fix.
>> Nevertheless, your free to improve it and contribute. ;-)
> Fortunately I do have some time, so I am going to check in the attached patch.
> It is based upon the one submitted by Andrew, but extended slightly.
> It tightens up the debug printing so that:
> * It is off by default. Uncomment /* #define ARC_ENABLE_DEBUG 1 */ to use it.
> By default, users (ie non-developers) should not have debug information inflicted upon them.
> Note - since this is debugging information, there is no need for translation.
> * It compiles without errors when debugging is enabled.
> It also fixed a seg-fault when the code tried to print out some
> non-existing information.
> * There is only one debug printing macro - ARC_DEBUG, rather than two.
> * When a reloc fails to be processed, for any reason including overflow,
> an error message is printed for the user. If debugging has been enabled
> then a very verbose error message is printed.
> Whilst testing the patch I also came across a problem with the arceb-elf
> configuration - it was selecting the little endian bfd vector by default.
> So I fixed that, and a linker testcase that always assumes a little endian
> arc target.
> 2016-07-15 Andrew Burgess <email@example.com>
> Nick Clifton <firstname.lastname@example.org>
> * elf32-arc.c (PR_DEBUG): Delete.
> Fix printing of debug information. Fix formatting of debug
> (debug_arc_reloc): Handle symbols that are not from an input file.
> (arc_do_relocation): Remove excessive exclamation points.
> (elf_arc_relocate_section): Print an informative message if the
> relocation fails, even if debugging is not enabled.
> * arc-got.h: Fix formatting. Fix printing of debug information.
> (new_got_entry_to_list): Use xmalloc.
> * config.bfd: use the big-endian arc vector as the default vector
> for big-endian arc targets.
> 2016-07-15 Nick Clifton <email@example.com>
> * testsuite/ld-arc/arc.exp: Always run the sda-relocs test in
> little endian mode.