This is the mail archive of the
mailing list for the binutils project.
[AArch64] Remove BFD overflow check restrictions
- From: Jiong Wang <jiong dot wang at arm dot com>
- To: "binutils\ at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 12 May 2015 15:33:56 +0100
- Subject: [AArch64] Remove BFD overflow check restrictions
- Authentication-results: sourceware.org; auth=none
I have been adding some testcases to test relocation overflow, while bfd
linker haven't given any error report.
After some debugging, it's caused by these extra checked removed in the
patch. They prevent the error report happening.
Although the comment says:
"If the overflowing reloc was to an undefined symbol, we have already
printed one error message and there is no point complaining again."
But, I haven't seen any error message before reach here.
x86/mips/sparc etc don't have such restriction. "git blame" shows it
first added to ARM back in 2000, 15 years ago, then propagated to a few
other targets including AArch64.
These code do looks insane and hard to understand, this patch remove
them. I'd like to fix further issue caused by this remove if any.
OK for trunk and 2.25 backport?
2015-05-12 Jiong Wang <email@example.com>
* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow check restrictions.
Author: Jiong Wang <firstname.lastname@example.org>
Date: Thu May 7 21:12:26 2015 +0000
[BFD] Release error report
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index bd42219..6808ca3 100644
@@ -5691,15 +5691,9 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
- /* If the overflowing reloc was to an undefined symbol,
- we have already printed one error message and there
- is no point complaining again. */
- if ((!h ||
- h->root.type != bfd_link_hash_undefined)
- && (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
+ if (!(*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset))