The extra line "#pragma weak __foo" breaks function aliasing. For the code bellow, the compiler emits warning "asm declaration ignored due to conflict with previous rename", in fact it really ignores asm declaration. Without "#pragma weak __foo", fce() calls __bar(), when it is included it tries to call bar().
#pragma weak __foo extern int bar (void); extern int bar (void) __asm__ ("__bar"); int fce() { bar(); } -- Summary: extra #pragma weak breaks function aliasing Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Petr dot Salinger at seznam dot cz GCC host triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37266