# DSO sorting test descriptions. # This file is to be processed by ../scripts/dso-ordering-test.py, see usage # in elf/Makefile for how it is executed. # We test both dynamic loader sorting algorithms tunable_option: glibc.rtld.dynamic_sort=1 tunable_option: glibc.rtld.dynamic_sort=2 # Sequence of single dependencies with no cycles. tst-dso-ordering1: a->b->c output: c>b>a>{}b->[cd]->e output: e>d>c>b>a>{}[bc]->[def]->[gh]->i output: i>h>g>f>e>d>c>b>a>{}b->[de];a->c->d->e output: e>d>c>b>a>{}c cross link is respected correctly tst-dso-ordering5: a!->[bc]->d;b->c output: d>c>b>a>{}[bcde]->f output: f>e>d>c>b>a>{}[bc];b->[cde];e->f output: f>e>d>c>b>a>{}b->c=>a;{}->[ba] output: c>b>a>{}b->c->d->e;{}!->[abcde] output: e>d>c>b>a>{}a->b->c;soname({})=c output: b>a>{}b->c->d order). # The older dynamic_sort=1 algorithm originally did not achieve this, # but this was a bug in the way _dl_sort_maps was called from _dl_close_worker, # effectively disabling proper force_first handling. # The new dynamic_sort=2 algorithm shows the effect of the simpler force_first # handling: the a object is simply moved to the front. # The below expected outputs are what the two algorithms currently produce # respectively, for regression testing purposes. tst-bz15311: {+a;+e;+f;+g;+d;%d;-d;-g;-f;-e;-a};a->b->c->d;d=>[ba];c=>a;b=>e=>a;c=>f=>b;d=>g=>c output(glibc.rtld.dynamic_sort=1): {+a[d>c>b>a>];+e[e>];+f[f>];+g[g>];+d[];%d(b(e(a()))a()g(c(a()f(b(e(a()))))));-d[];-g[];-f[];-e[];-a[c>b>a>];+e[e>];+f[f>];+g[g>];+d[];%d(b(e(a()))a()g(c(a()f(b(e(a()))))));-d[];-g[];-f[];-e[];-a[a1;a->a2;a2->a;b->b1;c->a1;c=>a1 output(glibc.rtld.dynamic_sort=1): {+a[a2>a1>a>];+b[b1>b>];-b[];%c(a1());}a1>a>];+b[b1>b>];-b[];%c(a1());}