Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 May 1998 16:23:40 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Brian Feldman <brianfeldman@hotmail.com>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: gdb elf-binary?
Message-ID:  <Pine.BSF.3.95q.980523162203.15699F-100000@herring.nlsystems.com>
In-Reply-To: <19980523135834.16507.qmail@m2.findmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 23 May 1998, Brian Feldman wrote:

> Mind giving me a hint on how to actually get rtld-elf to compile? I'm getting nowhere here.

My face is red :-).  I forgot to commit the link.h part of gdb-elf shared
lib support.  Apply this diff to link.h, make install from
/usr/src/include and try again:

Index: link.h
===================================================================
RCS file: /home/ncvs/src/include/link.h,v
retrieving revision 1.18
diff -u -c -r1.18 link.h
*** link.h	1998/02/06 16:46:44	1.18
--- link.h	1998/04/30 07:39:28
***************
*** 41,46 ****
--- 41,73 ----
  #ifndef _LINK_H_
  #define _LINK_H_
  
+ #if (defined(FREEBSD_ELF) || defined(__ELF__)) && !defined(FREEBSD_AOUT)
+ 
+ #include <sys/types.h>
+ 
+ struct link_map {
+ 	caddr_t		l_addr;			/* Base Address of library */
+ #ifdef __mips__
+ 	caddr_t		l_offs;			/* Load Offset of library */
+ #endif
+ 	const char	*l_name;		/* Absolute Path to Library */
+ 	const 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;
+ };
+ 
+ #else /* !__ELF__ */
+ 
  struct dl_info;
  
  /*
***************
*** 285,289 ****
--- 312,318 ----
  };
  
  #define _PATH_LD_HINTS		"/var/run/ld.so.hints"
+ 
+ #endif /* !__ELF__ */
  
  #endif /* _LINK_H_ */


--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 951 1891
					Fax:   +44 181 381 1039


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.980523162203.15699F-100000>