Fix objcopy --merge-notes dependency on qsort implementation behavior.
binutils/ * objcopy.c (compare_gnu_build_notes): Fix comparison results for overlapping ranges so that (A == B) == (B == A) holds.
This commit is contained in:
parent
086b06f3c9
commit
82ef9cad78
2 changed files with 23 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-01-27 Roland McGrath <mcgrathr@google.com>
|
||||
|
||||
* objcopy.c (compare_gnu_build_notes): Fix comparison results
|
||||
for overlapping ranges so that (A == B) == (B == A) holds.
|
||||
|
||||
2020-01-27 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* testsuite/lib/binutils-common.exp (big_or_little_endian): Replace
|
||||
|
|
|
@ -2052,6 +2052,8 @@ compare_gnu_build_notes (const void * data1, const void * data2)
|
|||
return -1;
|
||||
if (pnote1->end > pnote2->end)
|
||||
return 1;
|
||||
if (pnote1->end < pnote2->end)
|
||||
return -1;
|
||||
|
||||
/* Put OPEN notes before function notes. */
|
||||
if (is_open_note (pnote1) && ! is_open_note (pnote2))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue