diff options
author | Alan Modra <amodra@gmail.com> | 2019-10-14 13:57:01 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-10-14 16:47:13 +1030 |
commit | 3d9ee7d24be691e8b89cb5ebf0db744be279d8db (patch) | |
tree | 147e7737f9ad5aece81d86128dd57becec88730d /ld/ChangeLog | |
parent | 08dec09d8a26c115921b17110da1e07cb233c494 (diff) | |
download | fsf-binutils-gdb-3d9ee7d24be691e8b89cb5ebf0db744be279d8db.zip fsf-binutils-gdb-3d9ee7d24be691e8b89cb5ebf0db744be279d8db.tar.gz fsf-binutils-gdb-3d9ee7d24be691e8b89cb5ebf0db744be279d8db.tar.bz2 |
qsort: ldctor.c CONSTRUCTORS
ctor_cmp had an ineffective comparison of addresses in an attempt to
ensure sort stability. Comparing the addresses passed to the
comparison function can't work since those addresses may be from an
array that is already perturbed by qsort.
* ldctor.h (struct set_element): Make next field a union, adding
idx field.
* ldctor.c (ctor_cmp): Dereference pointer and lose unnecessary
const. Replace final sort on pointer value with final sort on idx.
(ldctor_add_set_entry): Adjust next field access.
(ldctor_build_sets): Likewise. Set u.idx field for sort.
Diffstat (limited to 'ld/ChangeLog')
-rw-r--r-- | ld/ChangeLog | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 19ed0b5..f8dca86 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,14 @@ 2019-10-14 Alan Modra <amodra@gmail.com> + * ldctor.h (struct set_element): Make next field a union, adding + idx field. + * ldctor.c (ctor_cmp): Dereference pointer and lose unnecessary + const. Replace final sort on pointer value with final sort on idx. + (ldctor_add_set_entry): Adjust next field access. + (ldctor_build_sets): Likewise. Set u.idx field for sort. + +2019-10-14 Alan Modra <amodra@gmail.com> + * pe-dll.c (reloc_data_type): Add idx field. (reloc_sort): Perform final sort by idx. (generate_reloc): Set idx. |