OLD | NEW |
1 /* | 1 /* |
2 * ELF object format helpers - x86:amd64 | 2 * ELF object format helpers - x86:amd64 |
3 * | 3 * |
4 * Copyright (C) 2004-2007 Michael Urman | 4 * Copyright (C) 2004-2007 Michael Urman |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
11 * 2. Redistributions in binary form must reproduce the above copyright | 11 * 2. Redistributions in binary form must reproduce the above copyright |
12 * notice, this list of conditions and the following disclaimer in the | 12 * notice, this list of conditions and the following disclaimer in the |
13 * documentation and/or other materials provided with the distribution. | 13 * documentation and/or other materials provided with the distribution. |
14 * | 14 * |
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS'' | 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS'' |
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE | 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE |
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
25 * POSSIBILITY OF SUCH DAMAGE. | 25 * POSSIBILITY OF SUCH DAMAGE. |
26 */ | 26 */ |
27 | 27 |
28 #include <util.h> | 28 #include <util.h> |
29 /*@unused@*/ RCSID("$Id: elf-x86-amd64.c 2210 2009-07-22 05:51:35Z peter $"); | |
30 | 29 |
31 #include <libyasm.h> | 30 #include <libyasm.h> |
32 #define YASM_OBJFMT_ELF_INTERNAL | 31 #define YASM_OBJFMT_ELF_INTERNAL |
33 #include "elf.h" | 32 #include "elf.h" |
34 #include "elf-machine.h" | 33 #include "elf-machine.h" |
35 | 34 |
36 static elf_machine_ssym elf_x86_amd64_ssyms[] = { | 35 static elf_machine_ssym elf_x86_amd64_ssyms[] = { |
37 {"pltoff", ELF_SSYM_SYM_RELATIVE, R_X86_64_PLTOFF64, 64}, | 36 {"pltoff", ELF_SSYM_SYM_RELATIVE, R_X86_64_PLTOFF64, 64}, |
38 {"plt", ELF_SSYM_SYM_RELATIVE, R_X86_64_PLT32, 32}, | 37 {"plt", ELF_SSYM_SYM_RELATIVE, R_X86_64_PLT32, 32}, |
39 {"gotplt", ELF_SSYM_SYM_RELATIVE, R_X86_64_GOTPLT64, 64}, | 38 {"gotplt", ELF_SSYM_SYM_RELATIVE, R_X86_64_GOTPLT64, 64}, |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 elf_x86_amd64_write_secthead, | 247 elf_x86_amd64_write_secthead, |
249 elf_x86_amd64_write_secthead_rel, | 248 elf_x86_amd64_write_secthead_rel, |
250 elf_x86_amd64_handle_reloc_addend, | 249 elf_x86_amd64_handle_reloc_addend, |
251 elf_x86_amd64_map_reloc_info_to_type, | 250 elf_x86_amd64_map_reloc_info_to_type, |
252 elf_x86_amd64_write_reloc, | 251 elf_x86_amd64_write_reloc, |
253 elf_x86_amd64_write_proghead, | 252 elf_x86_amd64_write_proghead, |
254 elf_x86_amd64_ssyms, | 253 elf_x86_amd64_ssyms, |
255 sizeof(elf_x86_amd64_ssyms)/sizeof(elf_x86_amd64_ssyms[0]), | 254 sizeof(elf_x86_amd64_ssyms)/sizeof(elf_x86_amd64_ssyms[0]), |
256 64 | 255 64 |
257 }; | 256 }; |
OLD | NEW |