src: make sort order deterministic, next try
We cannot compare pointers as they may point to qsort-local objects. And we must make sure that cmp(a,b) always agrees with cmp(b,a).
This commit is contained in:
@@ -119,6 +119,7 @@ struct ElfLinker::Section : private noncopyable {
|
||||
void *input = nullptr;
|
||||
byte *output = nullptr;
|
||||
unsigned size = 0;
|
||||
unsigned sort_id = 0; // for qsort()
|
||||
upx_uint64_t offset = 0;
|
||||
unsigned p2align = 0; // log2
|
||||
Section *next = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user