This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Speedup-objdump-in-processing-of-source-line-information
- From: Nick Clifton <nickc at redhat dot com>
- To: Igor Tsimbalist <tigor dot tools at gmail dot com>, binutils at sourceware dot org
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Tue, 8 Nov 2016 10:31:04 +0000
- Subject: Re: [PATCH] Speedup-objdump-in-processing-of-source-line-information
- Authentication-results: sourceware.org; auth=none
- References: <CACwv7=hErY9d+EdntxFrhMQfhk9sERLCDQnfUMBPwjpM85Ue+g@mail.gmail.com>
Hi Igor,
I am testing the patch now, but I did encounter one error whilst building the patched sources:
+static int
+compare_lookup_funcinfos (const void* a, const void* b)
+{
+ const struct lookup_funcinfo *lookup1 = a;
+ const struct lookup_funcinfo *lookup2 = b;
+ int result;
+
+ if (lookup1->low_addr < lookup2->low_addr)
+ result = -1;
+ else if (lookup1->low_addr > lookup2->low_addr)
+ result = 1;
+ else if (lookup1->high_addr < lookup2->high_addr)
+ result = -1;
+ else if (lookup1->high_addr > lookup1->high_addr)
+ result = 1;
+ else
+ result = 0;
+
+ return result;
+}
The last comparison is redundant because you are comparing the same entities. I have assumed
that this is a simple typo and the you means to compare lookup1->high_addr and lookup2->high_addr,
so I am proceeding with testing on that basis.
Cheers
Nick