2.c 288 B

12345678910111213141516171819
  1. /* Normally we should loose foo and keep _start and _init.
  2. With -u foo, we should keep that as well. */
  3. void _start() __asm__("_start");
  4. void _start()
  5. {
  6. }
  7. void __attribute__((section(".init")))
  8. _init()
  9. {
  10. }
  11. int foo() __asm__("foo");
  12. int foo()
  13. {
  14. static int x = 1;
  15. return x++;
  16. }