fix comments about elf_dynamic_do_* functions
Checks
Commit Message
These comments cite elf_dynamic_do_* functions with wrong names. The
loader's code is quite convoluted, let's keep the comments as accurate
as possible.
Thanks,
Andrea Monaco
Comments
On 26/12/2021 12:23, Andrea Monaco via Libc-alpha wrote:
>
> These comments cite elf_dynamic_do_* functions with wrong names. The
> loader's code is quite convoluted, let's keep the comments as accurate
> as possible.
>
>
> Thanks,
>
> Andrea Monaco
>
>
>
> diff --git a/elf/do-rel.h b/elf/do-rel.h
> index f441b74919..c8620bcc00 100644
> --- a/elf/do-rel.h
> +++ b/elf/do-rel.h
> @@ -17,7 +17,7 @@
> <https://www.gnu.org/licenses/>. */
>
> /* This file may be included twice, to define both
> - `elf_dynamic_do_rel' and `elf_dynamic_do_rela'. */
> + `elf_dynamic_do_Rel' and `elf_dynamic_do_Rela'. */
>
> #ifdef DO_RELA
> # define elf_dynamic_do_Rel elf_dynamic_do_Rela
> diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h
> index f619615e5c..26ade38554 100644
> --- a/elf/dynamic-link.h
> +++ b/elf/dynamic-link.h
> @@ -65,7 +65,7 @@ elf_machine_lazy_rel (struct link_map *map, struct r_scope_elem *scope[],
>
> #ifdef RESOLVE_MAP
>
> -/* Get the definitions of `elf_dynamic_do_rel' and `elf_dynamic_do_rela'.
> +/* Get the definitions of `elf_dynamic_do_Rel' and `elf_dynamic_do_Rela'.
> These functions are almost identical, so we use cpp magic to avoid
> duplicating their code. It cannot be done in a more general function
> because we must be able to completely inline. */
Since you there I think it worth to remove the backtick.
> diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
> index 169bed50ff..d8c0877c8c 100644
> --- a/sysdeps/i386/dl-machine.h
> +++ b/sysdeps/i386/dl-machine.h
> @@ -681,7 +681,7 @@ elf_machine_lazy_rel (struct link_map *map, struct r_scope_elem *scope[],
> else if (__glibc_likely (r_type == R_386_TLS_DESC))
> {
> const Elf32_Rel *const r = reloc;
> - /* The code below was borrowed from elf_dynamic_do_rel(). */
> + /* The code below was borrowed from elf_dynamic_do_Rel(). */
> const ElfW(Sym) *const symtab =
> (const void *) D_PTR (map, l_info[DT_SYMTAB]);
>
And also remove the '()' on function name.
@@ -17,7 +17,7 @@
<https://www.gnu.org/licenses/>. */
/* This file may be included twice, to define both
- `elf_dynamic_do_rel' and `elf_dynamic_do_rela'. */
+ `elf_dynamic_do_Rel' and `elf_dynamic_do_Rela'. */
#ifdef DO_RELA
# define elf_dynamic_do_Rel elf_dynamic_do_Rela
@@ -65,7 +65,7 @@ elf_machine_lazy_rel (struct link_map *map, struct r_scope_elem *scope[],
#ifdef RESOLVE_MAP
-/* Get the definitions of `elf_dynamic_do_rel' and `elf_dynamic_do_rela'.
+/* Get the definitions of `elf_dynamic_do_Rel' and `elf_dynamic_do_Rela'.
These functions are almost identical, so we use cpp magic to avoid
duplicating their code. It cannot be done in a more general function
because we must be able to completely inline. */
@@ -681,7 +681,7 @@ elf_machine_lazy_rel (struct link_map *map, struct r_scope_elem *scope[],
else if (__glibc_likely (r_type == R_386_TLS_DESC))
{
const Elf32_Rel *const r = reloc;
- /* The code below was borrowed from elf_dynamic_do_rel(). */
+ /* The code below was borrowed from elf_dynamic_do_Rel(). */
const ElfW(Sym) *const symtab =
(const void *) D_PTR (map, l_info[DT_SYMTAB]);