Deleted Added
full compact
elf32_machdep.c (105469) elf32_machdep.c (109605)
1/*-
2 * Copyright 1996-1998 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-1998 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/sys/powerpc/powerpc/elf_machdep.c 105469 2002-10-19 19:16:03Z marcel $
25 * $FreeBSD: head/sys/powerpc/powerpc/elf_machdep.c 109605 2003-01-21 02:42:44Z jake $
26 */
27
28#include <sys/param.h>
29#include <sys/kernel.h>
30#include <sys/systm.h>
31#include <sys/exec.h>
32#include <sys/imgact.h>
33#include <sys/malloc.h>

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

84 &elf32_freebsd_sysvec
85 };
86
87SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
88 (sysinit_cfunc_t) elf32_insert_brand_entry,
89 &freebsd_brand_info);
90
91/* Process one elf relocation with addend. */
26 */
27
28#include <sys/param.h>
29#include <sys/kernel.h>
30#include <sys/systm.h>
31#include <sys/exec.h>
32#include <sys/imgact.h>
33#include <sys/malloc.h>

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

84 &elf32_freebsd_sysvec
85 };
86
87SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
88 (sysinit_cfunc_t) elf32_insert_brand_entry,
89 &freebsd_brand_info);
90
91/* Process one elf relocation with addend. */
92int
93elf_reloc(linker_file_t lf, const void *data, int type)
92static int
93elf_reloc_internal(linker_file_t lf, const void *data, int type, int local)
94{
95 Elf_Addr relocbase = (Elf_Addr) lf->address;
96 Elf_Addr *where;
97 Elf_Addr addr;
98 Elf_Addr addend;
99 Elf_Word rtype, symidx;
100 const Elf_Rel *rel;
101 const Elf_Rela *rela;

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

160 printf("kldload: unexpected relocation type %d\n",
161 (int) rtype);
162 return -1;
163 }
164 return(0);
165}
166
167int
94{
95 Elf_Addr relocbase = (Elf_Addr) lf->address;
96 Elf_Addr *where;
97 Elf_Addr addr;
98 Elf_Addr addend;
99 Elf_Word rtype, symidx;
100 const Elf_Rel *rel;
101 const Elf_Rela *rela;

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

160 printf("kldload: unexpected relocation type %d\n",
161 (int) rtype);
162 return -1;
163 }
164 return(0);
165}
166
167int
168elf_reloc(linker_file_t lf, const void *data, int type)
169{
170
171 return (elf_reloc_internal(lf, data, type, 0));
172}
173
174int
175elf_reloc_local(linker_file_t lf, const void *data, int type)
176{
177
178 return (elf_reloc_internal(lf, data, type, 1));
179}
180
181int
168elf_cpu_load_file(linker_file_t lf __unused)
169{
170
171 return (0);
172}
173
174int
175elf_cpu_unload_file(linker_file_t lf __unused)
176{
177
178 return (0);
179}
182elf_cpu_load_file(linker_file_t lf __unused)
183{
184
185 return (0);
186}
187
188int
189elf_cpu_unload_file(linker_file_t lf __unused)
190{
191
192 return (0);
193}