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: [RFC] Fix PR 16910: Relocate symbol correctly if it is wrapped


On Wed, Jun 11, 2014 at 02:57:11PM +0800, Yao Qi wrote:
> What you meant probably is "l - sizeof WRAP + 1 != h->root.string",
> in order to check whether 'l' is incremented in [1] or not.

Oops, yes.  Caught out by last minute changes.

	* linker.c (unwrap_hash_lookup): Add missing parens.

diff --git a/bfd/linker.c b/bfd/linker.c
index d00238c..2e21054 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -621,7 +621,7 @@ unwrap_hash_lookup (struct bfd_link_info *info,
       if (bfd_hash_lookup (info->wrap_hash, l, FALSE, FALSE) != NULL)
 	{
 	  char save = 0;
-	  if (l - sizeof WRAP - 1 != h->root.string)
+	  if (l - (sizeof WRAP - 1) != h->root.string)
 	    {
 	      --l;
 	      save = *l;

-- 
Alan Modra
Australia Development Lab, IBM


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