Deleted Added
sdiff udiff text old ( 188440 ) new ( 192859 )
full compact
1/*-
2 * Copyright (c) 1998-2000 Doug Rabson
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/kern/link_elf.c 188440 2009-02-10 15:50:19Z attilio $");
29
30#include "opt_ddb.h"
31#include "opt_gdb.h"
32#include "opt_mac.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#ifdef GPROF

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

132 void ***, void ***, int *);
133static int link_elf_each_function_name(linker_file_t,
134 int (*)(const char *, void *),
135 void *);
136static int link_elf_each_function_nameval(linker_file_t,
137 linker_function_nameval_callback_t,
138 void *);
139static void link_elf_reloc_local(linker_file_t);
140static Elf_Addr elf_lookup(linker_file_t lf, Elf_Size symidx, int deps);
141
142static kobj_method_t link_elf_methods[] = {
143 KOBJMETHOD(linker_lookup_symbol, link_elf_lookup_symbol),
144 KOBJMETHOD(linker_symbol_values, link_elf_symbol_values),
145 KOBJMETHOD(linker_search_symbol, link_elf_search_symbol),
146 KOBJMETHOD(linker_unload, link_elf_unload_file),
147 KOBJMETHOD(linker_load_file, link_elf_load_file),
148 KOBJMETHOD(linker_link_preload, link_elf_link_preload),
149 KOBJMETHOD(linker_link_preload_finish, link_elf_link_preload_finish),
150 KOBJMETHOD(linker_lookup_set, link_elf_lookup_set),
151 KOBJMETHOD(linker_each_function_name, link_elf_each_function_name),
152 KOBJMETHOD(linker_each_function_nameval, link_elf_each_function_nameval),
153 KOBJMETHOD(linker_ctf_get, link_elf_ctf_get),
154 { 0, 0 }
155};
156
157static struct linker_class link_elf_class = {
158#if ELF_TARG_CLASS == ELFCLASS32
159 "elf32",
160#else
161 "elf64",

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

1385 relalim = (const Elf_Rela *)((const char *)ef->rela + ef->relasize);
1386 while (rela < relalim) {
1387 elf_reloc_local(lf, (Elf_Addr)ef->address, rela, ELF_RELOC_RELA,
1388 elf_lookup);
1389 rela++;
1390 }
1391 }
1392}