ac/rtld: fix sorting of LDS symbols by alignment
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 23 May 2019 13:17:24 +0000 (15:17 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 20 Jun 2019 00:30:32 +0000 (20:30 -0400)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/amd/common/ac_rtld.c

index dc9cc04705b24d77b7d12e1398c9c0fbef69a16e..92020c5f0dd50baf9dcd02b6a3b624d5fff4bf43 100644 (file)
@@ -130,9 +130,9 @@ static int compare_symbol_by_align(const void *lhsp, const void *rhsp)
        const struct ac_rtld_symbol *lhs = lhsp;
        const struct ac_rtld_symbol *rhs = rhsp;
        if (rhs->align > lhs->align)
-               return -1;
-       if (rhs->align < lhs->align)
                return 1;
+       if (rhs->align < lhs->align)
+               return -1;
        return 0;
 }