Bug 218018 - dl_iterate_phdr should mention Elf64_Phdr (in addition to Elf32_Phdr).
Summary: dl_iterate_phdr should mention Elf64_Phdr (in addition to Elf32_Phdr).
Status: NEW
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-16 21:56 UTC by Paul Pluzhnikov
Modified: 2024-01-01 11:53 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Paul Pluzhnikov 2023-10-16 21:56:11 UTC
dl_iterate_phdr should mention Elf64_Phdr (in addition to Elf32_Phdr).
Currently the man page says:

These program headers are structures of the following form:
  typedef { ... } Elf32_Phdr;

which is obviously wrong for 64-bit binaries.
Comment 1 Rajesh 2023-12-27 16:41:48 UTC
(In reply to Paul Pluzhnikov from comment #0)
> dl_iterate_phdr should mention Elf64_Phdr (in addition to Elf32_Phdr).
> Currently the man page says:
> 
> These program headers are structures of the following form:
>   typedef { ... } Elf32_Phdr;
> 
> which is obviously wrong for 64-bit binaries.

Hello Paul,

Do you think the following would be helpful.

Replacing "These program headers are structures of the following form:" with the following

The ELF program header is described by the type Elf32_Phdr or Elf64_Phdr depending on the architecture. Following is an example of 32 bit architecture. Refer to elf (man elf) for more information on 64 bit architecture.
Comment 2 Paul Pluzhnikov 2023-12-27 16:47:48 UTC
(In reply to Rajesh from comment #1)

> Do you think the following would be helpful.

Sure.
 
> Replacing "These program headers are structures of the following form:" with
> the following
> 
> The ELF program header is described by the type Elf32_Phdr or Elf64_Phdr
> depending on the architecture. Following is an example of 32 bit
> architecture. Refer to elf (man elf) for more information on 64 bit
> architecture.

I suggest deleting the last 4 words, i.e.

  Refer to elf (man elf) for more information.

since "man elf" describes both Elf{32,64}_Phdr in a bit more detail.
Comment 3 Rajesh 2023-12-28 16:01:21 UTC
Great.I have submitted the patch. If they approve it will be merged. Cheers Paul.
Comment 4 Alejandro Colomar 2024-01-01 11:53:07 UTC
On Wed, Dec 27, 2023 at 04:47:48PM +0000, bugzilla-daemon@kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=218018
> 
> --- Comment #2 from Paul Pluzhnikov (ppluzhnikov@google.com) ---
> (In reply to Rajesh from comment #1)
> 
> > Do you think the following would be helpful.
> 
> Sure.
> 
> > Replacing "These program headers are structures of the following form:"
> with
> > the following
> > 
> > The ELF program header is described by the type Elf32_Phdr or Elf64_Phdr
> > depending on the architecture. Following is an example of 32 bit
> > architecture. Refer to elf (man elf) for more information on 64 bit
> > architecture.
> 
> I suggest deleting the last 4 words, i.e.
> 
>   Refer to elf (man elf) for more information.
> 
> since "man elf" describes both Elf{32,64}_Phdr in a bit more detail.

I suggest creating link pages Elf32_Phdr(3type) and Elf64_Phdr(3type)
both of which link to elf(5).

> 
> -- 
> You may reply to this email to add a comment.
> 
> You are receiving this mail because:
> You are watching the assignee of the bug.

Note You need to log in before you can comment on or make changes to this bug.