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

File: [cvs.NetBSD.org] / src / include / link_elf.h (download)

Revision 1.1, Mon Dec 16 20:37:59 1996 UTC (27 years, 4 months ago) by cgd
Branch: MAIN

First cut at an ELF shared loader.  Originally from John Polstra's FreeBSD elf
kit, then hacked on by Matt Thomas <matt@3am-software.com>, then by me (to
make it work with new versions of the toolchain, etc.).  This runs, but it's
in serious need of cleaning and/or a fair bit of reworking.  See the README
file for more information, and a list of things to do.

/*	$NetBSD: link_elf.h,v 1.1 1996/12/16 20:37:59 cgd Exp $	*/

/*
 * This only exists for GDB.
 */
#ifndef _LINK_H
#define	_LINK_H

#include <sys/types.h>

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 in memory */
	struct link_map	*l_next, *l_prev;	/* linked list of of mapped libs */
};

struct r_debug {
	int		r_version;		/* not used */
	struct link_map *r_map;			/* list of loaded images */
	void		(*r_brk)(void);		/* pointer to break point */
	enum {
	    RT_CONSISTENT,			/* things are stable */
	    RT_ADD,				/* adding a shared library */
	    RT_DELETE				/* removing a shared library */
	}		r_state;
};
#endif	/* _LINK_H */