Deleted Added
full compact
rtld.h (76224) rtld.h (76296)
1/*-
2 * Copyright 1996, 1997, 1998, 1999, 2000 John D. Polstra.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 8 unchanged lines hidden (view full) ---

17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
1/*-
2 * Copyright 1996, 1997, 1998, 1999, 2000 John D. Polstra.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 8 unchanged lines hidden (view full) ---

17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * $FreeBSD: head/libexec/rtld-elf/rtld.h 76224 2001-05-02 23:56:21Z obrien $
25 * $FreeBSD: head/libexec/rtld-elf/rtld.h 76296 2001-05-05 23:21:05Z jdp $
26 */
27
28#ifndef RTLD_H /* { */
29#define RTLD_H 1
30
31#include <machine/elf.h>
32#include <sys/types.h>
33#include <sys/queue.h>

--- 127 unchanged lines hidden (view full) ---

161 Objlist dagmembers; /* DAG has these members (%) */
162 dev_t dev; /* Object's filesystem's device */
163 ino_t ino; /* Object's inode number */
164} Obj_Entry;
165
166#define RTLD_MAGIC 0xd550b87a
167#define RTLD_VERSION 1
168
26 */
27
28#ifndef RTLD_H /* { */
29#define RTLD_H 1
30
31#include <machine/elf.h>
32#include <sys/types.h>
33#include <sys/queue.h>

--- 127 unchanged lines hidden (view full) ---

161 Objlist dagmembers; /* DAG has these members (%) */
162 dev_t dev; /* Object's filesystem's device */
163 ino_t ino; /* Object's inode number */
164} Obj_Entry;
165
166#define RTLD_MAGIC 0xd550b87a
167#define RTLD_VERSION 1
168
169/*
170 * Symbol cache entry used during relocation to avoid multiple lookups
171 * of the same symbol.
172 */
173typedef struct Struct_SymCache {
174 const Elf_Sym *sym; /* Symbol table entry */
175 const Obj_Entry *obj; /* Shared object which defines it */
176} SymCache;
177
169extern void _rtld_error(const char *, ...) __printflike(1, 2);
170extern Obj_Entry *map_object(int, const char *, const struct stat *);
171extern void *xcalloc(size_t);
172extern void *xmalloc(size_t);
173extern char *xstrdup(const char *);
174extern Elf_Addr _GLOBAL_OFFSET_TABLE_[];
175
176/*
177 * Function declarations.
178 */
179int do_copy_relocations(Obj_Entry *);
180unsigned long elf_hash(const char *);
181const Elf_Sym *find_symdef(unsigned long, const Obj_Entry *,
178extern void _rtld_error(const char *, ...) __printflike(1, 2);
179extern Obj_Entry *map_object(int, const char *, const struct stat *);
180extern void *xcalloc(size_t);
181extern void *xmalloc(size_t);
182extern char *xstrdup(const char *);
183extern Elf_Addr _GLOBAL_OFFSET_TABLE_[];
184
185/*
186 * Function declarations.
187 */
188int do_copy_relocations(Obj_Entry *);
189unsigned long elf_hash(const char *);
190const Elf_Sym *find_symdef(unsigned long, const Obj_Entry *,
182 const Obj_Entry **, bool);
191 const Obj_Entry **, bool, SymCache *);
183void init_pltgot(Obj_Entry *);
184void lockdflt_init(LockInfo *);
185void obj_free(Obj_Entry *);
186Obj_Entry *obj_new(void);
187int reloc_non_plt(Obj_Entry *, Obj_Entry *);
188int reloc_plt(Obj_Entry *);
189int reloc_jmpslots(Obj_Entry *);
190void _rtld_bind_start(void);
191const Elf_Sym *symlook_obj(const char *, unsigned long,
192 const Obj_Entry *, bool);
193
194#endif /* } */
192void init_pltgot(Obj_Entry *);
193void lockdflt_init(LockInfo *);
194void obj_free(Obj_Entry *);
195Obj_Entry *obj_new(void);
196int reloc_non_plt(Obj_Entry *, Obj_Entry *);
197int reloc_plt(Obj_Entry *);
198int reloc_jmpslots(Obj_Entry *);
199void _rtld_bind_start(void);
200const Elf_Sym *symlook_obj(const char *, unsigned long,
201 const Obj_Entry *, bool);
202
203#endif /* } */