blob: 82698319f008b40c5590252097c81036848663ae [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
12#define __weak __attribute__((weak))
13
14#define UNSUPPORTED(name) \
15({ \
16 fprintf(stderr, "error: objtool: " name " not implemented\n"); \
17 return ENOSYS; \
18})
19
Julien Thierry6545eb02020-08-25 13:47:39 +010020int __weak check(struct objtool_file *file, bool orc)
Matt Helsley0decf1f2020-05-19 13:55:33 -070021{
22 UNSUPPORTED("check subcommand");
23}
24
25int __weak orc_dump(const char *_objname)
26{
27 UNSUPPORTED("orc");
28}
29
30int __weak create_orc(struct objtool_file *file)
31{
32 UNSUPPORTED("orc");
33}
34
35int __weak create_orc_sections(struct objtool_file *file)
36{
37 UNSUPPORTED("orc");
38}