* Fix overflow in addend_compare
@ 2006-10-17 1:27 Andreas Schwab
0 siblings, 0 replies; only message in thread
From: Andreas Schwab @ 2006-10-17 1:27 UTC (permalink / raw)
To: binutils
Trying to put the difference between two bfd_vma values in an int is not
going to give useful results. Committed as obvious.
Andreas.
2006-10-16 Andreas Schwab <schwab@suse.de>
* elfxx-ia64.c (addend_compare): Properly compute return value.
--- bfd/elfxx-ia64.c.~1.190.~ 2006-09-18 10:58:08.000000000 +0200
+++ bfd/elfxx-ia64.c 2006-10-16 19:15:32.000000000 +0200
@@ -2209,7 +2209,7 @@ addend_compare (const void *xp, const vo
const struct elfNN_ia64_dyn_sym_info *y
= (const struct elfNN_ia64_dyn_sym_info *) yp;
- return x->addend - y->addend;
+ return x->addend < y->addend ? -1 : x->addend > y->addend ? 1 : 0;
}
/* Sort elfNN_ia64_dyn_sym_info array and remove duplicates. */
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-16 17:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-17 1:27 Fix overflow in addend_compare Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).