[PATCH] Speedup-objdump-in-processing-of-source-line-information

Nick Clifton nickc@redhat.com
Tue Nov 8 10:31:00 GMT 2016


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



More information about the Binutils mailing list