summaryrefslogtreecommitdiff
path: root/tools/objtool/weak.c
diff options
context:
space:
mode:
authorJulien Thierry <jthierry@redhat.com>2020-08-25 15:47:39 +0300
committerJosh Poimboeuf <jpoimboe@redhat.com>2020-09-02 01:19:07 +0300
commit6545eb030e6f14cef8793a86312483c788eaee46 (patch)
tree19301101e41edf3595fd3a5ceaa5d7804abc3821 /tools/objtool/weak.c
parent7c9903c9bf716d89b34f96cc2ed64e28dabf570b (diff)
downloadlinux-6545eb030e6f14cef8793a86312483c788eaee46.tar.xz
objtool: Move object file loading out of check()
Structure objtool_file can be used by different subcommands. In fact it already is, by check and orc. Provide a function that allows to initialize objtool_file, that builtin can call, without relying on check to do the correct setup for them and explicitly hand the objtool_file to them. Reviewed-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Julien Thierry <jthierry@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'tools/objtool/weak.c')
-rw-r--r--tools/objtool/weak.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/objtool/weak.c b/tools/objtool/weak.c
index 942ea5e8ac36..82698319f008 100644
--- a/tools/objtool/weak.c
+++ b/tools/objtool/weak.c
@@ -17,9 +17,7 @@
return ENOSYS; \
})
-const char __weak *objname;
-
-int __weak check(const char *_objname, bool orc)
+int __weak check(struct objtool_file *file, bool orc)
{
UNSUPPORTED("check subcommand");
}