Use __attribute__((weak)) references where necessary