blob: 7843e9a7a72f4885285c4d6b4bb0a7d98fae19f9 [file] [log] [blame]
Matt Helsley0decf1f2020-05-19 13:55:33 -07001// 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.h"
11
Matt Helsley0decf1f2020-05-19 13:55:33 -070012#define UNSUPPORTED(name) \
13({ \
14 fprintf(stderr, "error: objtool: " name " not implemented\n"); \
15 return ENOSYS; \
16})
17
Julien Thierryd44becb2020-08-25 13:47:40 +010018int __weak check(struct objtool_file *file)
Matt Helsley0decf1f2020-05-19 13:55:33 -070019{
20 UNSUPPORTED("check subcommand");
21}
22
23int __weak orc_dump(const char *_objname)
24{
25 UNSUPPORTED("orc");
26}
27
28int __weak create_orc(struct objtool_file *file)
29{
30 UNSUPPORTED("orc");
31}
32
33int __weak create_orc_sections(struct objtool_file *file)
34{
35 UNSUPPORTED("orc");
36}