[BACK]Return to link_elf.h CVS log [TXT][DIR] Up to [local] / src / include

File: [local] / src / include / link_elf.h (download)

Revision 1.8, Fri Jan 28 04:59:15 2022 UTC (2 years, 3 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.7: +2 -2 lines

When it's the possessive of 'it', it's spelled "its", without the
apostrophe.

one from miod, other by "never just one" vibe

/*	$OpenBSD: link_elf.h,v 1.8 2022/01/28 04:59:15 guenther Exp $	*/

/*
 * Public domain.
 */

#ifndef _LINK_ELF_H
#define _LINK_ELF_H

#include <elf_abi.h>

#ifndef DT_PROCNUM
#define DT_PROCNUM 0
#endif

/*
 * struct link_map is a part of the protocol between the debugger and
 * ld.so. ld.so may have additional fields in its version of this
 * structure but those are ld.so private fields.
 */
struct link_map {
	caddr_t		l_addr;		/* Base address of library */
	const char	*l_name;	/* Absolute path to library */
	void		*l_ld;		/* pointer to _DYNAMIC */
	struct link_map	*l_next;
	struct link_map	*l_prev;
};

struct dl_phdr_info {
	Elf_Addr	dlpi_addr;
	const char	*dlpi_name;
	const Elf_Phdr	*dlpi_phdr;
	Elf_Half	dlpi_phnum;
};

__BEGIN_DECLS
int	dl_iterate_phdr (int (*)(struct dl_phdr_info *, size_t, void *),
	   void *);
void	*dl_unwind_find_exidx(const void *, int *);
__END_DECLS

#endif /* !_LINK_ELF_H */