Use stable sort for ld -r relocs
Alan Modra
amodra@gmail.com
Wed Aug 26 15:28:00 GMT 2015
More information about the Binutils mailing list
Wed Aug 26 15:28:00 GMT 2015
- Previous message (by thread): Use stable sort for ld -r relocs
- Next message (by thread): Use stable sort for ld -r relocs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Aug 26, 2015 at 02:15:06PM +0000, Paul_Koning@Dell.com wrote: > > > On Aug 26, 2015, at 10:02 AM, Alan Modra <amodra@gmail.com> wrote: > > > > A number of targets emit multiple relocs at a given r_offset, and > > depend on those relocs staying in their original order. qsort doesn't > > satisfy this requirement, although it appears from my non-rigorous > > testing that glibc's msort.c implementation may in fact be stable. > > Stability is (or isn't) a property of the algorithm. Agreed. > It is not necessary to do "non-rigorous testing" and such testing is not conclusive. I was merely giving a reason for why the problem hadn't come to light sooner, not justifying my code. Using qsort as I did, was stupid. -- Alan Modra Australia Development Lab, IBM
- Previous message (by thread): Use stable sort for ld -r relocs
- Next message (by thread): Use stable sort for ld -r relocs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list