From c2dce0a354d2274724ae61b14fb854861c0c618f Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Wed, 22 Jul 2009 05:51:35 +0000 Subject: [PATCH] Update elf special symbols: - Add tlsdesc and tlscall to both x86 and amd64. - Add 64-bit pltoff, gotplt, gotoff to amd64. svn path=/trunk/yasm/; revision=2210 --- modules/objfmts/elf/elf-x86-amd64.c | 9 ++++++++- modules/objfmts/elf/elf-x86-x86.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/objfmts/elf/elf-x86-amd64.c b/modules/objfmts/elf/elf-x86-amd64.c index 23675d64..16d70f9a 100644 --- a/modules/objfmts/elf/elf-x86-amd64.c +++ b/modules/objfmts/elf/elf-x86-amd64.c @@ -34,7 +34,10 @@ #include "elf-machine.h" static elf_machine_ssym elf_x86_amd64_ssyms[] = { + {"pltoff", ELF_SSYM_SYM_RELATIVE, R_X86_64_PLTOFF64, 64}, {"plt", ELF_SSYM_SYM_RELATIVE, R_X86_64_PLT32, 32}, + {"gotplt", ELF_SSYM_SYM_RELATIVE, R_X86_64_GOTPLT64, 64}, + {"gotoff", ELF_SSYM_SYM_RELATIVE, R_X86_64_GOTOFF64, 64}, {"gotpcrel", ELF_SSYM_SYM_RELATIVE, R_X86_64_GOTPCREL, 32}, {"tlsgd", ELF_SSYM_SYM_RELATIVE|ELF_SSYM_THREAD_LOCAL, R_X86_64_TLSGD, 32}, @@ -46,7 +49,11 @@ static elf_machine_ssym elf_x86_amd64_ssyms[] = { R_X86_64_TPOFF32, 32}, {"dtpoff", ELF_SSYM_SYM_RELATIVE|ELF_SSYM_THREAD_LOCAL, R_X86_64_DTPOFF32, 32}, - {"got", ELF_SSYM_SYM_RELATIVE, R_X86_64_GOT32, 32} + {"got", ELF_SSYM_SYM_RELATIVE, R_X86_64_GOT32, 32}, + {"tlsdesc", ELF_SSYM_SYM_RELATIVE|ELF_SSYM_THREAD_LOCAL, + R_X86_64_GOTPC32_TLSDESC, 32}, + {"tlscall", ELF_SSYM_SYM_RELATIVE|ELF_SSYM_THREAD_LOCAL, + R_X86_64_TLSDESC_CALL, 32} }; static int diff --git a/modules/objfmts/elf/elf-x86-x86.c b/modules/objfmts/elf/elf-x86-x86.c index 5357c45a..d2fa6d1e 100644 --- a/modules/objfmts/elf/elf-x86-x86.c +++ b/modules/objfmts/elf/elf-x86-x86.c @@ -54,7 +54,11 @@ static const elf_machine_ssym elf_x86_x86_ssyms[] = { R_386_TLS_GOTIE, 32}, {"indntpoff", ELF_SSYM_SYM_RELATIVE|ELF_SSYM_THREAD_LOCAL, R_386_TLS_IE, 32}, - {"got", ELF_SSYM_SYM_RELATIVE, R_386_GOT32, 32} + {"got", ELF_SSYM_SYM_RELATIVE, R_386_GOT32, 32}, + {"tlsdesc", ELF_SSYM_SYM_RELATIVE|ELF_SSYM_THREAD_LOCAL, + R_386_TLS_GOTDESC, 32}, + {"tlscall", ELF_SSYM_SYM_RELATIVE|ELF_SSYM_THREAD_LOCAL, + R_386_TLS_DESC_CALL, 32} }; static int -- 2.40.0