Lines Matching refs:weak
1 RUN: lld-link -lldmingw %S/Inputs/gnu-weak.o %S/Inputs/gnu-weak2.o -out:%t.exe
3 GNU ld can handle several definitions of the same weak symbol, and
5 weak definition encountered.
7 For each of the weak definitions, GNU tools produce a regular symbol
8 named .weak.<weaksymbol>.<othersymbol>, where the other symbol name is
12 produces similar regular symbols named .weak.<weaksymbol>.default.
17 $ cat gnu-weak.c
18 void weakfunc(void) __attribute__((weak));
21 __attribute__((weak)) void weakfunc() {
36 void weakfunc(void) __attribute__((weak));
38 __attribute__((weak)) void weakfunc() {
44 $ x86_64-w64-mingw32-gcc -c -O2 gnu-weak.c
47 $ x86_64-w64-mingw32-nm gnu-weak.o | grep weakfunc
48 0000000000000000 T .weak.weakfunc.main
51 0000000000000000 T .weak.weakfunc.otherfunc