gdb/testsuite: fix gdb.base/msym-bp-shl when running with Clang

When trying to test gdb.base/msym-bp-shl.exp using clang, it would have
many failures because one of the version of the foo function was being
optimized away. Adding __attribute__ ((used)) to it fixed this.
1 file changed