weak.c (d0034a7a4ac7fae708146ac0059b9c47a1543f0d) | weak.c (b51277eb9775ce916f9efd2c51533e481180c1e8) |
---|---|
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 12#define UNSUPPORTED(name) \ 13({ \ 14 fprintf(stderr, "error: objtool: " name " not implemented\n"); \ 15 return ENOSYS; \ 16}) 17 | 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 12#define UNSUPPORTED(name) \ 13({ \ 14 fprintf(stderr, "error: objtool: " name " not implemented\n"); \ 15 return ENOSYS; \ 16}) 17 |
18int __weak check(struct objtool_file *file) 19{ 20 UNSUPPORTED("check subcommand"); 21} 22 | |
23int __weak orc_dump(const char *_objname) 24{ | 18int __weak orc_dump(const char *_objname) 19{ |
25 UNSUPPORTED("orc"); | 20 UNSUPPORTED("ORC"); |
26} 27 28int __weak orc_create(struct objtool_file *file) 29{ | 21} 22 23int __weak orc_create(struct objtool_file *file) 24{ |
30 UNSUPPORTED("orc"); | 25 UNSUPPORTED("ORC"); |
31} | 26} |