handle post-asm-label attributes on variables

This commit is contained in:
Joe Soroka
2011-03-03 00:55:02 -08:00
parent 823f832630
commit 3beb383236
2 changed files with 28 additions and 25 deletions

View File

@ -2358,6 +2358,13 @@ extern int (*weak_fpa)() __attribute__((weak));
extern int (*weak_fpa)() __attribute__((weak));
extern int __attribute__((weak)) (*weak_fpb)();
extern __attribute__((weak)) int (*weak_fpc)();
extern int weak_asm_f1(void) asm("weak_asm_f1x") __attribute((weak));
extern int __attribute((weak)) weak_asm_f2(void) asm("weak_asm_f2x") ;
extern int __attribute((weak)) weak_asm_f3(void) asm("weak_asm_f3x") __attribute((weak));
extern int weak_asm_v1 asm("weak_asm_v1x") __attribute((weak));
extern int __attribute((weak)) weak_asm_v2 asm("weak_asm_v2x") ;
extern int __attribute((weak)) weak_asm_v3(void) asm("weak_asm_v3x") __attribute((weak));
void __attribute__((weak)) weak_test(void)
@ -2370,6 +2377,13 @@ void __attribute__((weak)) weak_test(void)
printf("weak_v3=%d\n",&weak_v3 ? weak_v3 : 123);
printf("weak_fpa=%d\n",&weak_fpa ? weak_fpa() : 123);
printf("weak_fpb=%d\n",&weak_fpb ? weak_fpb() : 123);
printf("weak_fpc=%d\n",&weak_fpc ? weak_fpc() : 123);
printf("weak_asm_f1=%d\n", weak_asm_f1 != NULL);
printf("weak_asm_f2=%d\n", weak_asm_f2 != NULL);
printf("weak_asm_f3=%d\n", weak_asm_f3 != NULL);
printf("weak_asm_v1=%d\n",&weak_asm_v1 != NULL);
printf("weak_asm_v2=%d\n",&weak_asm_v2 != NULL);
printf("weak_asm_v3=%d\n",&weak_asm_v3 != NULL);
}