diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2010-06-27 03:11:45 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2010-06-27 03:11:45 +0000 |
commit | b73b329100b459edcd48a384e4da10fac427afa4 (patch) | |
tree | d99fd841d1e189a6c18fb657ca83084e7d89ab96 | |
parent | 8a46d785199bcae03d0469a55b99e08fe33263fa (diff) |
Add the TPOFF* and DTP{MOD,OFF}* definitions that ld.so will need for
doing thread-local storage and fix a typo in one that was already defined.
ok kettenis@ drahn@
-rw-r--r-- | sys/arch/amd64/include/reloc.h | 4 | ||||
-rw-r--r-- | sys/arch/i386/include/reloc.h | 36 | ||||
-rw-r--r-- | sys/arch/powerpc/include/reloc.h | 15 | ||||
-rw-r--r-- | sys/arch/sparc/include/exec.h | 8 | ||||
-rw-r--r-- | sys/arch/sparc64/include/reloc.h | 24 |
5 files changed, 57 insertions, 30 deletions
diff --git a/sys/arch/amd64/include/reloc.h b/sys/arch/amd64/include/reloc.h index d5e2d4d762c..09df798135c 100644 --- a/sys/arch/amd64/include/reloc.h +++ b/sys/arch/amd64/include/reloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: reloc.h,v 1.1 2004/02/10 14:30:05 drahn Exp $ */ +/* $OpenBSD: reloc.h,v 1.2 2010/06/27 03:11:44 guenther Exp $ */ /* * Copyright (c) 2002,2003 Dale Rahn @@ -44,7 +44,7 @@ #define R_X86_64_PC16 13 #define R_X86_64_8 14 #define R_X86_64_PC8 15 -#define R_X86_64_DPTMOD64 16 +#define R_X86_64_DTPMOD64 16 #define R_X86_64_DTPOFF64 17 #define R_X86_64_TPOFF64 18 #define R_X86_64_TLSGD 19 diff --git a/sys/arch/i386/include/reloc.h b/sys/arch/i386/include/reloc.h index 8f597ff7c0c..42b34fae737 100644 --- a/sys/arch/i386/include/reloc.h +++ b/sys/arch/i386/include/reloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: reloc.h,v 1.1 2003/04/17 03:42:14 drahn Exp $ */ +/* $OpenBSD: reloc.h,v 1.2 2010/06/27 03:11:44 guenther Exp $ */ /* * Copyright (c) 2002,2003 Dale Rahn @@ -29,21 +29,25 @@ #define R_TYPE(X) __CONCAT(RELOC_,X) -#define RELOC_NONE 0 /* No reloc */ -#define RELOC_32 1 /* Direct 32 bit */ -#define RELOC_PC32 2 /* PC relative 32 bit */ -#define RELOC_GOT32 3 /* 32 bit GOT entry */ -#define RELOC_PLT32 4 /* 32 bit PLT address */ -#define RELOC_COPY 5 /* Copy symbol at runtime */ -#define RELOC_GLOB_DAT 6 /* Create GOT entry */ -#define RELOC_JUMP_SLOT 7 /* Create PLT entry */ -#define RELOC_RELATIVE 8 /* Adjust by program base */ -#define RELOC_GOTOFF 9 /* 32 bit offset to GOT */ -#define RELOC_GOTPC 10 /* 32 bit PC relative offset to GOT */ -#define RELOC_16 20 -#define RELOC_PC16 21 -#define RELOC_8 22 -#define RELOC_PC8 23 +#define RELOC_NONE 0 /* No reloc */ +#define RELOC_32 1 /* Direct 32 bit */ +#define RELOC_PC32 2 /* PC relative 32 bit */ +#define RELOC_GOT32 3 /* 32 bit GOT entry */ +#define RELOC_PLT32 4 /* 32 bit PLT address */ +#define RELOC_COPY 5 /* Copy symbol at runtime */ +#define RELOC_GLOB_DAT 6 /* Create GOT entry */ +#define RELOC_JUMP_SLOT 7 /* Create PLT entry */ +#define RELOC_RELATIVE 8 /* Adjust by program base */ +#define RELOC_GOTOFF 9 /* 32 bit offset to GOT */ +#define RELOC_GOTPC 10 /* 32 bit PC relative offset to GOT */ +#define RELOC_TLS_TPOFF 14 /* negative offset in static TLS block */ +#define RELOC_16 20 +#define RELOC_PC16 21 +#define RELOC_8 22 +#define RELOC_PC8 23 +#define RELOC_TLS_DTPMOD32 35 /* ID of module containing symbol */ +#define RELOC_TLS_DTPOFF32 36 /* Offset in TLS block */ +#define RELOC_TLS_TPOFF32 37 /* Offset in static TLS block */ #endif /* _MACH_RELOC_H */ diff --git a/sys/arch/powerpc/include/reloc.h b/sys/arch/powerpc/include/reloc.h index 2474859a86e..bf77daec8eb 100644 --- a/sys/arch/powerpc/include/reloc.h +++ b/sys/arch/powerpc/include/reloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: reloc.h,v 1.2 2001/03/29 18:52:19 drahn Exp $ */ +/* $OpenBSD: reloc.h,v 1.3 2010/06/27 03:11:44 guenther Exp $ */ /* $NetBSD: reloc.h,v 1.1 1996/09/30 16:34:33 ws Exp $ */ /*- @@ -72,6 +72,19 @@ enum reloc_type { RELOC_PLT16_HA, /* ABI defines this as 32nd entry, but we ignore this, at least for now */ RELOC_SDAREL, + + RELOC_TLSC = 67, + RELOC_DTPMOD32, + RELOC_TPREL16, + RELOC_TPREL16_LO, + RELOC_TPREL16_HI, + RELOC_TPREL16_HA, + RELOC_TPREL32, + RELOC_DTPREL16, + RELOC_DTPREL16_LO, + RELOC_DTPREL16_HI, + RELOC_DTPREL16_HA, + RELOC_DTPREL32, RELOC_MAX }; diff --git a/sys/arch/sparc/include/exec.h b/sys/arch/sparc/include/exec.h index ccd646f74be..0bfa97b9a1c 100644 --- a/sys/arch/sparc/include/exec.h +++ b/sys/arch/sparc/include/exec.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.h,v 1.11 2005/12/10 03:16:16 deraadt Exp $ */ +/* $OpenBSD: exec.h,v 1.12 2010/06/27 03:11:44 guenther Exp $ */ /* $NetBSD: exec.h,v 1.7 1994/11/20 20:53:02 deraadt Exp $ */ /* @@ -105,6 +105,12 @@ struct relocation_info_sparc { #define R_SPARC_7 43 #define R_SPARC_5 44 #define R_SPARC_6 45 +#define R_SPARC_TLS_DTPMOD32 74 +#define R_SPARC_TLS_DTPMOD64 75 +#define R_SPARC_TLS_DTPOFF32 76 +#define R_SPARC_TLS_DTPOFF64 77 +#define R_SPARC_TLS_TPOFF32 78 +#define R_SPARC_TLS_TPOFF64 79 #define R_TYPE(name) __CONCAT(R_SPARC_,name) #endif diff --git a/sys/arch/sparc64/include/reloc.h b/sys/arch/sparc64/include/reloc.h index b099468bf55..05a206f479c 100644 --- a/sys/arch/sparc64/include/reloc.h +++ b/sys/arch/sparc64/include/reloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: reloc.h,v 1.3 2006/05/07 15:36:40 miod Exp $ */ +/* $OpenBSD: reloc.h,v 1.4 2010/06/27 03:11:44 guenther Exp $ */ /* * Copyright (c) 2001 Artur Grabowski <art@openbsd.org> * @@ -18,15 +18,19 @@ #ifndef _MACH_RELOC_H_ #define _MACH_RELOC_H_ -#define RELOC_NONE 0 +#define RELOC_NONE 0 -#define RELOC_COPY 19 -#define RELOC_GLOB_DAT 20 -#define RELOC_JMP_SLOT 21 -#define RELOC_RELATIVE 22 - -#define RELOC_64 32 - -#define RELOC_UA64 54 +#define RELOC_COPY 19 +#define RELOC_GLOB_DAT 20 +#define RELOC_JMP_SLOT 21 +#define RELOC_RELATIVE 22 +#define RELOC_64 32 +#define RELOC_UA64 54 +#define RELOC_TLS_DTPMOD32 74 +#define RELOC_TLS_DTPMOD64 75 +#define RELOC_TLS_DTPOFF32 76 +#define RELOC_TLS_DTPOFF64 77 +#define RELOC_TLS_TPOFF32 78 +#define RELOC_TLS_TPOFF64 79 #endif /* _MACH_RELOC_H_ */ |