10decf1f8SMatt Helsley // SPDX-License-Identifier: GPL-2.0-or-later 20decf1f8SMatt Helsley /* 30decf1f8SMatt Helsley * Copyright (C) 2020 Matt Helsley <mhelsley@vmware.com> 40decf1f8SMatt Helsley * Weak definitions necessary to compile objtool without 50decf1f8SMatt Helsley * some subcommands (e.g. check, orc). 60decf1f8SMatt Helsley */ 70decf1f8SMatt Helsley 80decf1f8SMatt Helsley #include <stdbool.h> 90decf1f8SMatt Helsley #include <errno.h> 107786032eSVasily Gorbik #include <objtool/objtool.h> 110decf1f8SMatt Helsley 120decf1f8SMatt Helsley #define UNSUPPORTED(name) \ 130decf1f8SMatt Helsley ({ \ 140decf1f8SMatt Helsley fprintf(stderr, "error: objtool: " name " not implemented\n"); \ 150decf1f8SMatt Helsley return ENOSYS; \ 160decf1f8SMatt Helsley }) 170decf1f8SMatt Helsley orc_dump(const char * _objname)180decf1f8SMatt Helsleyint __weak orc_dump(const char *_objname) 190decf1f8SMatt Helsley { 20*b51277ebSJosh Poimboeuf UNSUPPORTED("ORC"); 210decf1f8SMatt Helsley } 220decf1f8SMatt Helsley orc_create(struct objtool_file * file)23ab4e0744SJosh Poimboeufint __weak orc_create(struct objtool_file *file) 240decf1f8SMatt Helsley { 25*b51277ebSJosh Poimboeuf UNSUPPORTED("ORC"); 260decf1f8SMatt Helsley } 27