Index: third_party/yasm/patched-yasm/modules/objfmts/elf/elf.h |
=================================================================== |
--- third_party/yasm/patched-yasm/modules/objfmts/elf/elf.h (revision 71129) |
+++ third_party/yasm/patched-yasm/modules/objfmts/elf/elf.h (working copy) |
@@ -1,4 +1,4 @@ |
-/* $Id: elf.h 2040 2008-02-21 08:57:23Z peter $ |
+/* $Id: elf.h 2208 2009-07-22 05:45:03Z peter $ |
* ELF object format helpers |
* |
* Copyright (C) 2003-2007 Michael Urman |
@@ -303,7 +303,10 @@ |
R_386_TLS_LE_32 = 34, /* Offset relative to static TLS block */ |
R_386_TLS_DTPMOD32 = 35, /* ID of module containing symbol */ |
R_386_TLS_DTPOFF32 = 36, /* Offset in TLS block */ |
- R_386_TLS_TPOFF32 = 37 /* Offset in static TLS block */ |
+ R_386_TLS_TPOFF32 = 37, /* Offset in static TLS block */ |
+ R_386_TLS_GOTDESC = 39, |
+ R_386_TLS_DESC_CALL = 40, |
+ R_386_TLS_DESC = 41 |
} elf_386_relocation_type; |
typedef enum { |
@@ -330,7 +333,18 @@ |
R_X86_64_TLSLD = 20, /* word32, PC-rel offset to LD GOT block */ |
R_X86_64_DTPOFF32 = 21, /* word32, offset to TLS block */ |
R_X86_64_GOTTPOFF = 22, /* word32, PC-rel offset to IE GOT entry */ |
- R_X86_64_TPOFF32 = 23 /* word32, offset in initial TLS block */ |
+ R_X86_64_TPOFF32 = 23, /* word32, offset in initial TLS block */ |
+ R_X86_64_PC64 = 24, /* word64, PC relative */ |
+ R_X86_64_GOTOFF64 = 25, /* word64, offset to GOT */ |
+ R_X86_64_GOTPC32 = 26, /* word32, signed pc relative to GOT */ |
+ R_X86_64_GOT64 = 27, /* word64, GOT entry offset */ |
+ R_X86_64_GOTPCREL64 = 28, /* word64, signed pc relative to GOT entry */ |
+ R_X86_64_GOTPC64 = 29, /* word64, signed pc relative to GOT */ |
+ R_X86_64_GOTPLT64 = 30, /* like GOT64, but indicates PLT entry needed */ |
+ R_X86_64_PLTOFF64 = 31, /* word64, GOT relative offset to PLT entry */ |
+ R_X86_64_GOTPC32_TLSDESC = 34, /* GOT offset for TLS descriptor */ |
+ R_X86_64_TLSDESC_CALL = 35, /* Marker for call through TLS descriptor */ |
+ R_X86_64_TLSDESC = 36 /* TLS descriptor */ |
} elf_x86_64_relocation_type; |
struct elf_secthead { |
@@ -377,6 +391,7 @@ |
size_t valsize; |
yasm_intnum *addend; |
/*@null@*/ yasm_symrec *wrt; |
+ int is_GOT_sym; |
}; |
STAILQ_HEAD(elf_strtab_head, elf_strtab_entry); |
@@ -407,6 +422,7 @@ |
extern const yasm_assoc_data_callback elf_section_data; |
extern const yasm_assoc_data_callback elf_symrec_data; |
+extern const yasm_assoc_data_callback elf_ssym_symrec_data; |
const elf_machine_handler *elf_set_arch(struct yasm_arch *arch, |
@@ -422,7 +438,8 @@ |
/*@null@*/ yasm_symrec *wrt, |
yasm_intnum *addr, |
int rel, |
- size_t valsize); |
+ size_t valsize, |
+ int is_GOT_sym); |
void elf_reloc_entry_destroy(void *entry); |
/* strtab functions */ |
@@ -491,7 +508,9 @@ |
struct yasm_symrec *sym); |
void elf_secthead_add_size(elf_secthead *shead, yasm_intnum *size); |
char *elf_secthead_name_reloc_section(const char *basesect); |
-void elf_handle_reloc_addend(yasm_intnum *intn, elf_reloc_entry *reloc); |
+void elf_handle_reloc_addend(yasm_intnum *intn, |
+ elf_reloc_entry *reloc, |
+ unsigned long offset); |
unsigned long elf_secthead_write_rel_to_file(FILE *f, elf_section_index symtab, |
yasm_section *sect, |
elf_secthead *esd, |