D45788 (later reverted) breaks a few test cases, because they check address that are not always invariable (under some condition).
All 4 test case failures are caused by the variable size of .dynstr, which contains absolute path to some .so file. So any section that are placed after .dynstr may have a variable address, check statements asserting those values are flaky.
D45788 makes this more likely to happen, because D45788 rearranges output sections, so .dynstr is usually placed at the beginning of "A" sections.
Just add a -soname foo.so: