From d178e3765d52ad7bb7869693d15c3dabb7a81689 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 12 Dec 2020 19:52:26 +0300 Subject: [PATCH] libelf: fix spelling typos in comments Auxialiary -> Auxiliary constucted -> constructed desriptor -> descriptor endianess -> endianness responsibilty -> responsibility sufficent -> sufficient elf.h comes from glibc and therefore is excluded. Signed-off-by: Dmitry V. Levin --- libelf/ChangeLog | 11 +++++++++++ libelf/common.h | 2 +- libelf/elf32_checksum.c | 2 +- libelf/elf_begin.c | 4 ++-- libelf/elf_compress.c | 2 +- libelf/elf_compress_gnu.c | 2 +- libelf/gelf.h | 2 +- libelf/libelf.h | 2 +- libelf/libelfP.h | 2 +- 9 files changed, 20 insertions(+), 9 deletions(-) diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 38c0162..41727fb 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,14 @@ +2020-12-12 Dmitry V. Levin + + * common.h: Fix spelling typo in comment. + * gelf.h: Likewise. + * libelf.h: Likewise. + * libelfP.h: Likewise. + * elf32_checksum.c (elfw2): Likewise. + * elf_begin.c (dup_elf, write_file): Likewise. + * elf_compress.c (__libelf_compress): Likewise. + * elf_compress_gnu.c (elf_compress_gnu): Likewise. + 2020-12-11 Dmitry V. Levin * Makefile.am (GCC_INCLUDE): Remove. diff --git a/libelf/common.h b/libelf/common.h index b0175f6..e41c717 100644 --- a/libelf/common.h +++ b/libelf/common.h @@ -133,7 +133,7 @@ libelf_release_all (Elf *elf) } -/* Macro to convert endianess in place. It determines the function it +/* Macro to convert endianness in place. It determines the function it has to use itself. */ #define CONVERT(Var) \ (Var) = (sizeof (Var) == 1 \ diff --git a/libelf/elf32_checksum.c b/libelf/elf32_checksum.c index f9dfccb..c5f27bb 100644 --- a/libelf/elf32_checksum.c +++ b/libelf/elf32_checksum.c @@ -115,7 +115,7 @@ elfw2(LIBELFBITS,checksum) (Elf *elf) /* To compute the checksum we need to get to the data. For repeatable results we must use the external format. The data - we get with 'elf'getdata' might be changed for endianess + we get with 'elf'getdata' might be changed for endianness reasons. Therefore we use 'elf_rawdata' if possible. But this function can fail if the data was constructed by the program. In this case we have to use 'elf_getdata' and diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c index 8107a10..43828c9 100644 --- a/libelf/elf_begin.c +++ b/libelf/elf_begin.c @@ -1040,7 +1040,7 @@ dup_elf (int fildes, Elf_Cmd cmd, Elf *ref) } /* This is an archive. We must create a descriptor for the archive - member the internal pointer of the archive file desriptor is + member the internal pointer of the archive file descriptor is pointing to. First read the header of the next member if this has not happened already. */ if (ref->state.ar.elf_ar_hdr.ar_name == NULL @@ -1064,7 +1064,7 @@ dup_elf (int fildes, Elf_Cmd cmd, Elf *ref) } -/* Return desriptor for empty file ready for writing. */ +/* Return descriptor for empty file ready for writing. */ static struct Elf * write_file (int fd, Elf_Cmd cmd) { diff --git a/libelf/elf_compress.c b/libelf/elf_compress.c index 9d6f15c..df0144e 100644 --- a/libelf/elf_compress.c +++ b/libelf/elf_compress.c @@ -124,7 +124,7 @@ __libelf_compress (Elf_Scn *scn, size_t hsize, int ei_data, int flush = Z_NO_FLUSH; do { - /* Convert to raw if different endianess. */ + /* Convert to raw if different endianness. */ cdata = *data; bool convert = ei_data != MY_ELFDATA && data->d_size > 0; if (convert) diff --git a/libelf/elf_compress_gnu.c b/libelf/elf_compress_gnu.c index 7aed464..3d2977e 100644 --- a/libelf/elf_compress_gnu.c +++ b/libelf/elf_compress_gnu.c @@ -143,7 +143,7 @@ elf_compress_gnu (Elf_Scn *scn, int inflate, unsigned int flags) } else if (inflate == 0) { - /* In theory the user could have constucted a compressed section + /* In theory the user could have constructed a compressed section by hand. And in practice they do. For example when copying a section from one file to another using elf_newdata. So we have to use elf_getdata (not elf_rawdata). */ diff --git a/libelf/gelf.h b/libelf/gelf.h index 0619880..7a3c87a 100644 --- a/libelf/gelf.h +++ b/libelf/gelf.h @@ -95,7 +95,7 @@ typedef Elf64_Dyn GElf_Dyn; /* Version definition sections. */ typedef Elf64_Verdef GElf_Verdef; -/* Auxialiary version information. */ +/* Auxiliary version information. */ typedef Elf64_Verdaux GElf_Verdaux; /* Version dependency section. */ diff --git a/libelf/libelf.h b/libelf/libelf.h index 1ff11c9..a139e73 100644 --- a/libelf/libelf.h +++ b/libelf/libelf.h @@ -376,7 +376,7 @@ extern Elf64_Chdr *elf64_getchdr (Elf_Scn *__scn); It is always an error to call these functions on SHT_NOBITS sections or if the section has the SHF_ALLOC flag set. elf_compress_gnu will not check whether the section name starts - with ".debug" or .zdebug". It is the responsibilty of the caller + with ".debug" or .zdebug". It is the responsibility of the caller to make sure the deprecated GNU compression method is only called on correctly named sections (and to change the name of the section when using elf_compress_gnu). diff --git a/libelf/libelfP.h b/libelf/libelfP.h index 6a3243d..b8ffa18 100644 --- a/libelf/libelfP.h +++ b/libelf/libelfP.h @@ -148,7 +148,7 @@ enum }; -/* The visible `Elf_Data' type is not sufficent for some operations due +/* The visible `Elf_Data' type is not sufficient for some operations due to a misdesigned interface. Extend it for internal purposes. */ typedef struct { -- 2.7.4