[COMMITTED] libelf: Fix documentation of elf_getshdrstrndx and elf_getshstrndx.

Mark Wielaard mark@klomp.org
Fri Jul 27 12:46:00 GMT 2018


Because of copy/paste error part of the documentation for
elf_getshdrstrndx and elf_getshstrndx was actually for
elf_getshdrnum and elf_getshnum. Fix it to refer to the proper
ehdr field and deprecated function name.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 libelf/ChangeLog | 5 +++++
 libelf/libelf.h  | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 91d9b47..744c5b4 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-27  Mark Wielaard  <mark@klomp.org>
+
+	* libelf.h (elf_getshdrstrndx): Fix documentation.
+	(elf_getshstrndx): Likewise.
+
 2018-06-19  Mark Wielaard  <mark@klomp.org>
 
 	* libelfP.h (__libelf_type_align): Remove !ALLOW_UNALIGNED guard.
diff --git a/libelf/libelf.h b/libelf/libelf.h
index 547c0f5..61f1923 100644
--- a/libelf/libelf.h
+++ b/libelf/libelf.h
@@ -310,13 +310,13 @@ extern int elf_getshnum (Elf *__elf, size_t *__dst)
 
 
 /* Get the section index of the section header string table in the ELF
-   file.  If the index cannot be represented in the e_shnum field of
+   file.  If the index cannot be represented in the e_shstrndx field of
    the ELF header the information from the sh_link field in the zeroth
    section header is used.  */
 extern int elf_getshdrstrndx (Elf *__elf, size_t *__dst);
-/* Sun messed up the implementation of 'elf_getshnum' in their implementation.
-   It was agreed to make the same functionality available under a different
-   name and obsolete the old name.  */
+/* Sun messed up the implementation of 'elf_getshstrndx' in their
+   implementation.  It was agreed to make the same functionality available
+   under a different name and obsolete the old name.  */
 extern int elf_getshstrndx (Elf *__elf, size_t *__dst)
      __deprecated_attribute__;
 
-- 
1.8.3.1



More information about the Elfutils-devel mailing list