{
if (a->vna_other == vernum)
{
+ *hidden = true;
version_string = a->vna_nodename;
break;
}
{{readelf -rn indirect-extern-access-3.rd}} \
"indirect-extern-access-2b" \
] \
+ [list \
+ "Build pr28158.so" \
+ "-shared -Wl,-version-script,pr27128.t" \
+ "-fPIC" \
+ { pr28158-1.c } \
+ {} \
+ "pr28158.so" \
+ ] \
+ [list \
+ "Build pr28158" \
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed \
+ tmpdir/pr28158.so" \
+ "" \
+ { pr28158-2.S } \
+ {{readelf {--dyn-syms -W} pr28158.rd} {nm -D pr28158.nd}} \
+ "pr28158" \
+ ] \
]
run_ld_link_exec_tests [list \
--- /dev/null
+int foo = 0;
--- /dev/null
+ .text
+ .section .text.startup,"ax",@progbits
+ .p2align 4
+ .globl main
+ .type main, @function
+main:
+ .cfi_startproc
+#ifdef __x86_64__
+ movl foo(%rip), %eax
+#else
+ movl foo, %eax
+#endif
+ ret
+ .cfi_endproc
+ .size main, .-main
+ .section .note.GNU-stack,"",@progbits
--- /dev/null
+#...
+[0-9a-z]+ B foo@VERS_2.0
+#pass
--- /dev/null
+#ld: -shared -version-script pr27128.t
+#readelf: --dyn-syms --wide
+#target: x86_64-*-linux* i?86-*-linux-gnu
+
+#...
+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +OBJECT +GLOBAL +DEFAULT +[1-9]+ foo@VERS_2.0 \(2\)
+#pass
--- /dev/null
+VERS_2.0 {
+global:
+ foo;
+local:
+ *;
+};
-[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +\(VERS_2\.0\) +(0x[0-9a-f]+ )?_?show_foo
-[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +VERS_2\.0 +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +\(VERS_2\.0\) +(0x[0-9a-f]+ )?_?show_foo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-f]+ +DF \*UND\* [0-9a-f]+ +Base +(0x[0-9a-f]+ )?_?show_foo
-[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +VERS_2.0 +(0x[0-9a-f]+ )?_?show_foo
-[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +VERS_1.2 +(0x[0-9a-f]+ )?_?show_foo
-[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +VERS_1.1 +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +\(VERS_2.0\) +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +\(VERS_1.2\) +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +\(VERS_1.1\) +(0x[0-9a-f]+ )?_?show_foo