search for: weak2

Displaying 6 results from an estimated 6 matches for "weak2".

Did you mean: weak
2017 Jan 13
6
Weak symbol/alias semantics
...__attribute__ ((weak)); void f() { printf("In weak1.c:f\n"); } void test1() { printf("Call f() from weak1.c:\n"); f(); printf("Call weakalias() from weak1.c:\n"); weakalias(); printf("Call strongalias() from weak1.c:\n"); strongalias(); } $ cat weak2.c #include <stdio.h> void f () __attribute__ ((weak)); void f() { printf("In weak2.c:f\n"); } extern void test1(); void test2() { test1(); printf("Call f() from weak2.c\n"); f(); } If I link weak1.c before weak2.c, nothing is surprising (we always invoke weak1.c:...
2017 Jan 14
3
Weak symbol/alias semantics
...ak1.c:f\n"); > } > void test1() { > printf("Call f() from weak1.c:\n"); > f(); > printf("Call weakalias() from weak1.c:\n"); > weakalias(); > printf("Call strongalias() from weak1.c:\n"); > strongalias(); > } > > $ cat weak2.c > #include <stdio.h> > > void f () __attribute__ ((weak)); > void f() > { > printf("In weak2.c:f\n"); > } > extern void test1(); > void test2() > { > test1(); > printf("Call f() from weak2.c\n"); > f(); > } > > If...
2017 Jan 14
4
Weak symbol/alias semantics
...test1() { >> printf("Call f() from weak1.c:\n"); >> f(); >> printf("Call weakalias() from weak1.c:\n"); >> weakalias(); >> printf("Call strongalias() from weak1.c:\n"); >> strongalias(); >> } >> >> $ cat weak2.c >> #include <stdio.h> >> >> void f () __attribute__ ((weak)); >> void f() >> { >> printf("In weak2.c:f\n"); >> } >> extern void test1(); >> void test2() >> { >> test1(); >> printf("Call f() from wea...
2017 Jan 14
4
Weak symbol/alias semantics
...est1() { >> printf("Call f() from weak1.c:\n"); >> f(); >> printf("Call weakalias() from weak1.c:\n"); >> weakalias(); >> printf("Call strongalias() from weak1.c:\n"); >> strongalias(); >> } >> >> $ cat weak2.c >> #include <stdio.h> >> >> void f () __attribute__ ((weak)); >> void f() >> { >> printf("In weak2.c:f\n"); >> } >> extern void test1(); >> void test2() >> { >> test1(); >> printf("Call f() from we...
2017 Jan 18
2
Weak symbol/alias semantics
...ntf("Call weakalias() from weak1.c:\n"); >>>>>> weakalias(); >>>>>> printf("Call strongalias() from weak1.c:\n"); >>>>>> strongalias(); >>>>>> } >>>>>> >>>>>> $ cat weak2.c >>>>>> #include <stdio.h> >>>>>> >>>>>> void f () __attribute__ ((weak)); >>>>>> void f() >>>>>> { >>>>>> printf("In weak2.c:f\n"); >>>>>> } >>&gt...
2017 Jan 18
2
Weak symbol/alias semantics
...> > printf("Call f() from weak1.c:\n"); > > f(); > > printf("Call weakalias() from weak1.c:\n"); > > weakalias(); > > printf("Call strongalias() from weak1.c:\n"); > > strongalias(); > > } > > > > $ cat weak2.c > > #include <stdio.h> > > > > void f () __attribute__ ((weak)); > > void f() > > { > > printf("In weak2.c:f\n"); > > } > > extern void test1(); > > void test2() > > { > > test1(); > > printf("Call...