Hi Aaron,

On Wed, 2025-12-31 at 21:50 -0500, Aaron Merey wrote:
> Signed-off-by: Aaron Merey <[email protected]>
> ---
>  doc/Makefile.am        |  1 +
>  doc/gelf_update_move.3 | 81 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 82 insertions(+)
>  create mode 100644 doc/gelf_update_move.3
> 
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index 5ef3eb3b..d648e669 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -114,6 +114,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \
>                       gelf_offscn.3 \
>                       gelf_update_ehdr.3 \
>                       gelf_update_dyn.3 \
> +                     gelf_update_move.3 \
>                       gelf_update_phdr.3 \
>                       gelf_update_shdr.3 \
>                       gelf_update_rel.3 \

OK.

> diff --git a/doc/gelf_update_move.3 b/doc/gelf_update_move.3
> new file mode 100644
> index 00000000..9682de7d
> --- /dev/null
> +++ b/doc/gelf_update_move.3
> @@ -0,0 +1,81 @@
> +.TH GELF_UPDATE_MOVE 3 2025-12-30 "Libelf" "Libelf Programmer's Manual"
> +
> +.SH NAME
> +gelf_update_move \- Update class\-independent move structure at the given 
> index
> +
> +.SH SYNOPSIS
> +.nf
> +.B #include <gelf.h>
> +
> +.BI "int gelf_update_move (Elf_Data *" data ", int " ndx ", GElf_Move *" src 
> ");"

OK.

> +.SH DESCRIPTION
> +This function copies a class\-independent move structure from
> +.I src
> +into the
> +.B SHT_SUNW_move
> +section associated with
> +.I data
> +at entry index
> +.IR ndx .

Same comments as for gelf_getmove. d_type ELF_T_MOVE. Solaris/Sun only.
No usage or tests. And I think it just doesn't work because the
implementation has:

  /* The types for 32 and 64 bit are the same.  Lucky us.  */
  assert (sizeof (GElf_Move) == sizeof (Elf32_Move));
  assert (sizeof (GElf_Move) == sizeof (Elf64_Move));

Which isn't true. Elf32_Move has two fields m_info and m_poffset which
are smaller than the Elf64_Move fields.

> +.SH PARAMETERS
> +.TP
> +.I data
> +Pointer to an
> +.B Elf_Data
> +associated with a
> +.B SHT_SUNW_move
> +section.
> +
> +.TP
> +.I ndx
> +Zero\-based index of the move structure entry to be updated within
> +.IR data .
> +
> +.TP
> +.I src
> +Pointer to a caller\-provided move structure.  For
> +.B ELFCLASS32
> +binaries,
> +.B m_info
> +and
> +.B m_poffset
> +should be able to fit within unsigned 32-bit values.

They should, but this isn't checked in our implementation.

> +.I src
> +should not be NULL.
> +
> +.SH RETURN VALUE
> +On success, this function returns a non-zero value and updates
> +the move entry at index
> +.I ndx
> +in
> +.IR data .
> +The section associated with
> +.I data
> +is flagged with
> +.BR ELF_F_DIRTY .
> +On failure, zero is returned and elf_errno is set.  If
> +.I data
> +is NULL, then zero is returned without setting elf_errno.

OK.

> +.SH SEE ALSO
> +.BR gelf_getmove (3),
> +.BR libelf (3),
> +.BR elf (5)

See above (and in gelf_getmove), where is GElf_Move described?

> +.SH ATTRIBUTES
> +.TS
> +allbox;
> +lbx lb lb
> +l l l.
> +Interface    Attribute       Value
> +T{
> +.na
> +.nh
> +.BR gelf_update_move ()
> +T}   Thread safety   MT-Safe
> +.TE
> +
> +.SH REPORTING BUGS
> +Report bugs to <[email protected]> or 
> https://sourceware.org/bugzilla/.

OK.

Thanks,

Mark

Reply via email to