From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [PATCH] libdwfl: Make __libdwfl_addrsym a static function in dwfl_module_addrsym.c
Date: Mon, 04 Jun 2018 22:04:00 -0000 [thread overview]
Message-ID: <1528149869-3701-1-git-send-email-mark@klomp.org> (raw)
__libdwfl_addrsym is only used in the dwfl_module_addrsym.c source.
There is no need to mark this as a (shared) internal function.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
libdwfl/ChangeLog | 5 +++++
libdwfl/dwfl_module_addrsym.c | 9 ++++++---
libdwfl/libdwflP.h | 9 ---------
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 34aa07d..acb4236 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-04 Mark Wielaard <mark@klomp.org>
+
+ * libdwflP.h (__libdwfl_addrsym): Remove function declaration.
+ * dwfl_module_addrsym.c (__libdwfl_addrsym): Make a static function.
+
2018-05-27 Mark Wielaard <mark@klomp.org>
* relocate.c (__libdwfl_relocate): Always call relocate_section with
diff --git a/libdwfl/dwfl_module_addrsym.c b/libdwfl/dwfl_module_addrsym.c
index db302e6..2336b60 100644
--- a/libdwfl/dwfl_module_addrsym.c
+++ b/libdwfl/dwfl_module_addrsym.c
@@ -235,9 +235,12 @@ search_table (struct search_state *state, int start, int end)
}
/* Returns the name of the symbol "closest" to ADDR.
- Never returns symbols at addresses above ADDR. */
-const char *
-internal_function
+ Never returns symbols at addresses above ADDR.
+
+ Wrapper for old dwfl_module_addrsym and new dwfl_module_addrinfo.
+ adjust_st_value set to true returns adjusted SYM st_value, set to false
+ it will not adjust SYM at all, but does match against resolved values. */
+static const char *
__libdwfl_addrsym (Dwfl_Module *_mod, GElf_Addr _addr, GElf_Off *off,
GElf_Sym *_closest_sym, GElf_Word *shndxp,
Elf **elfp, Dwarf_Addr *biasp, bool _adjust_st_value)
diff --git a/libdwfl/libdwflP.h b/libdwfl/libdwflP.h
index 3629871..31e6e19 100644
--- a/libdwfl/libdwflP.h
+++ b/libdwfl/libdwflP.h
@@ -463,15 +463,6 @@ extern const char *__libdwfl_getsym (Dwfl_Module *mod, int ndx, GElf_Sym *sym,
bool *resolved, bool adjust_st_value)
internal_function;
-/* Internal wrapper for old dwfl_module_addrsym and new dwfl_module_addrinfo.
- adjust_st_value set to true returns adjusted SYM st_value, set to false
- it will not adjust SYM at all, but does match against resolved values. */
-extern const char *__libdwfl_addrsym (Dwfl_Module *mod, GElf_Addr addr,
- GElf_Off *off, GElf_Sym *sym,
- GElf_Word *shndxp, Elf **elfp,
- Dwarf_Addr *bias,
- bool adjust_st_value) internal_function;
-
extern void __libdwfl_module_free (Dwfl_Module *mod) internal_function;
/* Find the main ELF file, update MOD->elferr and/or MOD->main.elf. */
--
1.8.3.1
next reply other threads:[~2018-06-04 22:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 22:04 Mark Wielaard [this message]
2018-06-08 9:57 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1528149869-3701-1-git-send-email-mark@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).