https://sourceware.org/bugzilla/show_bug.cgi?id=14851
Hannes Domani <ssbssa at yahoo dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ssbssa at yahoo dot de --- Comment #2 from Hannes Domani <ssbssa at yahoo dot de> --- (In reply to Paolo Bonzini from comment #1) > Correct test case: > > g1.c: > int f() { printf("strong"); return 82; } > int g() { printf("strong"); return 83; } > > g2.c: > #include <stdio.h> > static int weak_f() { return 42; } > static int weak_g() { return 43; } > typeof(weak_f) f __attribute__((__weak__, __alias__("weak_f"))); > typeof(weak_g) g __attribute__((__weak__, __alias__("weak_g"))); > int main() { printf("%d/%d\n", f(), g()); } > > g3.c: > static int default_f() { return 42; } > static int default_g() { return 43; } > static typeof(default_f) weak_f __attribute__((__weakref__("f"))); > static typeof(default_g) weak_g __attribute__((__weakref__("g"))); > int main() { printf("%d/%d\n", (weak_f?:default_f)(), > (weak_g?:default_g)()); } With these files I get the following results (with ld 2.33.1 & gcc 9.2.0): gcc g2.c: 42/43 gcc g1.c g2.c: strongstrong82/83 gcc g3.c: 42/43 gcc g1.c g3.c: strongstrong82/83 So I think this was fixed. -- You are receiving this mail because: You are on the CC list for the bug.