weak.c 558 B

1234567891011121314151617181920212223242526
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Copyright (C) 2020 Matt Helsley <[email protected]>
  4. * Weak definitions necessary to compile objtool without
  5. * some subcommands (e.g. check, orc).
  6. */
  7. #include <stdbool.h>
  8. #include <errno.h>
  9. #include <objtool/objtool.h>
  10. #define UNSUPPORTED(name) \
  11. ({ \
  12. fprintf(stderr, "error: objtool: " name " not implemented\n"); \
  13. return ENOSYS; \
  14. })
  15. int __weak orc_dump(const char *_objname)
  16. {
  17. UNSUPPORTED("ORC");
  18. }
  19. int __weak orc_create(struct objtool_file *file)
  20. {
  21. UNSUPPORTED("ORC");
  22. }