elf_machdep.c (120422) | elf_machdep.c (123742) |
---|---|
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 --- 10 unchanged lines hidden (view full) --- 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 26#include <sys/cdefs.h> | 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 --- 10 unchanged lines hidden (view full) --- 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 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: head/sys/amd64/amd64/elf_machdep.c 120422 2003-09-25 01:10:26Z peter $"); | 27__FBSDID("$FreeBSD: head/sys/amd64/amd64/elf_machdep.c 123742 2003-12-23 02:42:39Z peter $"); |
28 29#include <sys/param.h> 30#include <sys/kernel.h> 31#include <sys/systm.h> 32#include <sys/exec.h> 33#include <sys/imgact.h> 34#include <sys/linker.h> 35#include <sys/sysent.h> --- 37 unchanged lines hidden (view full) --- 73 exec_setregs, 74 NULL 75}; 76 77static Elf64_Brandinfo freebsd_brand_info = { 78 ELFOSABI_FREEBSD, 79 EM_X86_64, 80 "FreeBSD", | 28 29#include <sys/param.h> 30#include <sys/kernel.h> 31#include <sys/systm.h> 32#include <sys/exec.h> 33#include <sys/imgact.h> 34#include <sys/linker.h> 35#include <sys/sysent.h> --- 37 unchanged lines hidden (view full) --- 73 exec_setregs, 74 NULL 75}; 76 77static Elf64_Brandinfo freebsd_brand_info = { 78 ELFOSABI_FREEBSD, 79 EM_X86_64, 80 "FreeBSD", |
81 "", | 81 NULL, |
82 "/libexec/ld-elf.so.1", | 82 "/libexec/ld-elf.so.1", |
83 &elf64_freebsd_sysvec | 83 &elf64_freebsd_sysvec, 84 NULL, |
84 }; 85 86SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY, 87 (sysinit_cfunc_t) elf64_insert_brand_entry, 88 &freebsd_brand_info); 89 | 85 }; 86 87SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY, 88 (sysinit_cfunc_t) elf64_insert_brand_entry, 89 &freebsd_brand_info); 90 |
91static Elf64_Brandinfo freebsd_brand_oinfo = { 92 ELFOSABI_FREEBSD, 93 EM_X86_64, 94 "FreeBSD", 95 NULL, 96 "/usr/libexec/ld-elf.so.1", 97 &elf64_freebsd_sysvec, 98 NULL, 99 }; 100 101SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, 102 (sysinit_cfunc_t) elf64_insert_brand_entry, 103 &freebsd_brand_oinfo); 104 |
|
90/* Process one elf relocation with addend. */ 91static int 92elf_reloc_internal(linker_file_t lf, const void *data, int type, int local) 93{ 94 Elf_Addr relocbase = (Elf_Addr) lf->address; 95 Elf_Addr *where; 96 Elf_Addr addr; 97 Elf_Addr addend; --- 111 unchanged lines hidden --- | 105/* Process one elf relocation with addend. */ 106static int 107elf_reloc_internal(linker_file_t lf, const void *data, int type, int local) 108{ 109 Elf_Addr relocbase = (Elf_Addr) lf->address; 110 Elf_Addr *where; 111 Elf_Addr addr; 112 Elf_Addr addend; --- 111 unchanged lines hidden --- |