File: weak.c

package info (click to toggle)
chibicc 1.0.23.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,832 kB
  • sloc: ansic: 62,911; sh: 275; makefile: 92
file content (10 lines) | stat: -rw-r--r-- 313 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
#include "test.h"

// Define the original function `lxc_attach_main`.
int lxc_attach_main(int argc, char *argv[]) {
    printf("This is lxc_attach_main.\n");
    return 0;
}

// Declare `main` as a weak alias of `lxc_attach_main`.
int __attribute__((weak, alias("lxc_attach_main"))) main(int argc, char *argv[]);