Merge tag 'for-5.8/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
[linux/fpc-iii.git] / tools / objtool / weak.c
blob942ea5e8ac36061fc4b8935b08a79d8902115b04
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 */
8 #include <stdbool.h>
9 #include <errno.h>
10 #include "objtool.h"
12 #define __weak __attribute__((weak))
14 #define UNSUPPORTED(name) \
15 ({ \
16 fprintf(stderr, "error: objtool: " name " not implemented\n"); \
17 return ENOSYS; \
20 const char __weak *objname;
22 int __weak check(const char *_objname, bool orc)
24 UNSUPPORTED("check subcommand");
27 int __weak orc_dump(const char *_objname)
29 UNSUPPORTED("orc");
32 int __weak create_orc(struct objtool_file *file)
34 UNSUPPORTED("orc");
37 int __weak create_orc_sections(struct objtool_file *file)
39 UNSUPPORTED("orc");