| 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | /* |
| 3 | * Copyright (C) 2020 Matt Helsley <mhelsley@vmware.com> |
| 4 | * Weak definitions necessary to compile objtool without |
| 5 | * some subcommands (e.g. check, orc). |
| 6 | */ |
| 7 | |
| 8 | #include <stdbool.h> |
| 9 | #include <errno.h> |
| 10 | #include <objtool/objtool.h> |
| 11 | #include <objtool/arch.h> |
| 12 | #include <objtool/builtin.h> |
| 13 | |
| 14 | #define UNSUPPORTED(name) \ |
| 15 | ({ \ |
| 16 | fprintf(stderr, "error: objtool: " name " not implemented\n"); \ |
| 17 | return ENOSYS; \ |
| 18 | }) |
| 19 | |
| 20 | int __weak orc_dump(const char *_objname) |
| 21 | { |
| 22 | UNSUPPORTED("ORC" ); |
| 23 | } |
| 24 | |
| 25 | int __weak orc_create(struct objtool_file *file) |
| 26 | { |
| 27 | UNSUPPORTED("ORC" ); |
| 28 | } |
| 29 | |
| 30 | int __weak cmd_klp(int argc, const char **argv) |
| 31 | { |
| 32 | UNSUPPORTED("klp" ); |
| 33 | } |
| 34 | |