From 434442d70771cccb4cf0baa124357020ca5a0ae2 Mon Sep 17 00:00:00 2001 From: anjiahao Date: Thu, 18 Jul 2024 16:36:39 +0800 Subject: [PATCH] modlib:move modlib_findsection to common headfile Signed-off-by: anjiahao --- include/nuttx/lib/modlib.h | 19 +++++++++++++++++++ libs/libc/modlib/modlib.h | 19 ------------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/nuttx/lib/modlib.h b/include/nuttx/lib/modlib.h index a41730094f4..228a24e8807 100644 --- a/include/nuttx/lib/modlib.h +++ b/include/nuttx/lib/modlib.h @@ -455,6 +455,25 @@ int modlib_undepend(FAR struct module_s *importer); int modlib_read(FAR struct mod_loadinfo_s *loadinfo, FAR uint8_t *buffer, size_t readsize, off_t offset); +/**************************************************************************** + * Name: modlib_findsection + * + * Description: + * A section by its name. + * + * Input Parameters: + * loadinfo - Load state information + * sectname - Name of the section to find + * + * Returned Value: + * On success, the index to the section is returned; A negated errno value + * is returned on failure. + * + ****************************************************************************/ + +int modlib_findsection(FAR struct mod_loadinfo_s *loadinfo, + FAR const char *sectname); + /**************************************************************************** * Name: modlib_registry_lock * diff --git a/libs/libc/modlib/modlib.h b/libs/libc/modlib/modlib.h index 7405042f93c..43bb58eda8f 100644 --- a/libs/libc/modlib/modlib.h +++ b/libs/libc/modlib/modlib.h @@ -194,25 +194,6 @@ int modlib_loadhdrs(FAR struct mod_loadinfo_s *loadinfo); int modlib_sectname(FAR struct mod_loadinfo_s *loadinfo, FAR const Elf_Shdr *shdr); -/**************************************************************************** - * Name: modlib_findsection - * - * Description: - * A section by its name. - * - * Input Parameters: - * loadinfo - Load state information - * sectname - Name of the section to find - * - * Returned Value: - * On success, the index to the section is returned; A negated errno value - * is returned on failure. - * - ****************************************************************************/ - -int modlib_findsection(FAR struct mod_loadinfo_s *loadinfo, - FAR const char *sectname); - /**************************************************************************** * Name: modlib_allocbuffer *