diff options
| author | John Polstra <jdp@FreeBSD.org> | 1997-01-12 00:09:11 +0000 |
|---|---|---|
| committer | John Polstra <jdp@FreeBSD.org> | 1997-01-12 00:09:11 +0000 |
| commit | d3c677c7e0039cb80844be0eb5c0a6d065a84b62 (patch) | |
| tree | e649aba77300efae321e47b9754dae4f50176d26 /libexec/rtld-aout | |
| parent | 0604e6536759d29a6059e9ec70308c086cfc95d8 (diff) | |
Notes
Diffstat (limited to 'libexec/rtld-aout')
| -rw-r--r-- | libexec/rtld-aout/i386/md.c | 20 | ||||
| -rw-r--r-- | libexec/rtld-aout/i386/md.h | 3 |
2 files changed, 21 insertions, 2 deletions
diff --git a/libexec/rtld-aout/i386/md.c b/libexec/rtld-aout/i386/md.c index 546bd8e2e970c..3c9610b127ae5 100644 --- a/libexec/rtld-aout/i386/md.c +++ b/libexec/rtld-aout/i386/md.c @@ -27,10 +27,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: md.c,v 1.12 1995/03/04 17:46:20 nate Exp $ + * $Id: md.c,v 1.13 1996/10/01 01:27:56 peter Exp $ */ #include <sys/param.h> +#include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> @@ -172,6 +173,23 @@ u_long addr; } /* + * Bind a jmpslot to its target address. TARGET is where the jmpslot + * should jump to, and WHERE is a pointer to the jmpslot's address field. + * This is called by the dynamic linker when LD_BIND_NOW is set in the + * environment. + */ +void +md_bind_jmpslot(target, where) +u_long target; +caddr_t where; +{ + jmpslot_t *sp = + (jmpslot_t *) (where - offsetof(jmpslot_t, addr[0])); + + md_fix_jmpslot(sp, (long) sp, target); +} + +/* * Update the relocation record for a RRS jmpslot. */ void diff --git a/libexec/rtld-aout/i386/md.h b/libexec/rtld-aout/i386/md.h index f7ad9d406df18..cdf3191f76d35 100644 --- a/libexec/rtld-aout/i386/md.h +++ b/libexec/rtld-aout/i386/md.h @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: md.h,v 1.12 1995/03/04 17:46:21 nate Exp $ + * $Id: md.h,v 1.13 1996/10/01 01:27:58 peter Exp $ */ #ifndef __MD_H__ @@ -232,6 +232,7 @@ long md_get_addend __P((struct relocation_info *, unsigned char *)); void md_relocate __P((struct relocation_info *, long, unsigned char *, int)); void md_make_jmpslot __P((jmpslot_t *, long, long)); void md_fix_jmpslot __P((jmpslot_t *, long, u_long)); +void md_bind_jmpslot __P((u_long, caddr_t)); int md_make_reloc __P((struct relocation_info *, struct relocation_info *, int)); void md_make_jmpreloc __P((struct relocation_info *, struct relocation_info *, int)); void md_make_gotreloc __P((struct relocation_info *, struct relocation_info *, int)); |
