gdb: fix vfork with multiple threads
[deliverable/binutils-gdb.git] / elfcpp / i386.h
index 13937884e70f4e0708c2393a15d6b1d5a3c3597f..d1a1af5743826749c1593adb02d9c6a1cb623c94 100644 (file)
@@ -1,6 +1,6 @@
 // i386.h -- ELF definitions specific to EM_386  -*- C++ -*-
 
-// Copyright 2006, 2007, Free Software Foundation, Inc.
+// Copyright (C) 2006-2021 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of elfcpp.
 #ifndef ELFCPP_I386_H
 #define ELFCPP_I386_H
 
+// Documentation for the TLS relocs is taken from
+//   http://people.redhat.com/drepper/tls.pdf
+//   http://www.lsd.ic.unicamp.br/~oliva/writeups/TLS/RFC-TLSDESC-x86.txt
+
 namespace elfcpp
 {
 
 enum
 {
-  R_386_NONE = 0,
-  R_386_32 = 1,
-  R_386_PC32 = 2,
-  R_386_GOT32 = 3,
-  R_386_PLT32 = 4,
-  R_386_COPY = 5,
-  R_386_GLOB_DAT = 6,
-  R_386_JUMP_SLOT = 7,
-  R_386_RELATIVE = 8,
-  R_386_GOTOFF = 9,
-  R_386_GOTPC = 10,
+  R_386_NONE = 0,        // No reloc
+  R_386_32 = 1,          // Direct 32 bit zero extended
+  R_386_PC32 = 2,        // PC relative 32 bit signed
+  R_386_GOT32 = 3,       // 32 bit GOT entry  
+  R_386_PLT32 = 4,       // 32 bit PLT address
+  R_386_COPY = 5,        // Copy symbol at runtime
+  R_386_GLOB_DAT = 6,    // Create GOT entry      
+  R_386_JUMP_SLOT = 7,   // Create PLT entry      
+  R_386_RELATIVE = 8,    // Adjust by program base
+  R_386_GOTOFF = 9,      // 32-bit GOT offset
+  R_386_GOTPC = 10,      // 32-bit PC relative offset to GOT
   // Used by Sun.
   R_386_32PLT = 11,
   // TLS extensions.
-  R_386_TLS_TPOFF = 14,
-  R_386_TLS_IE = 15,
-  R_386_TLS_GOTIE = 16,
-  R_386_TLS_LE = 17,
-  R_386_TLS_GD = 18,
-  R_386_TLS_LDM = 19,
+  R_386_TLS_TPOFF = 14,  // Outstanding Initial Exec reloc, gnu-style (both)
+  R_386_TLS_IE = 15,     // Initial Initial Exec reloc, gnu-style (no-PIC)
+  R_386_TLS_GOTIE = 16,  // Initial Initial Exec reloc, gnu-style (for PIC)
+  R_386_TLS_LE = 17,     // Initial Local Exec reloc, gnu-style
+  R_386_TLS_GD = 18,     // Initial General Dynamic reloc, gnu-style
+  R_386_TLS_LDM = 19,    // Initial Local Dynamic reloc, gnu-style
   // GNU extensions.
-  R_386_16 = 20,
-  R_386_PC16 = 21,
-  R_386_8 = 22,
-  R_386_PC8 = 23,
+  R_386_16 = 20,         // Direct 16 bit zero extended
+  R_386_PC16 = 21,       // 16 bit sign extended pc relative
+  R_386_8 = 22,          // Direct 8 bit sign extended
+  R_386_PC8 = 23,        // 8 bit sign extended pc relative
   // More TLS relocs.
-  R_386_TLS_GD_32 = 24,
-  R_386_TLS_GD_PUSH = 25,
-  R_386_TLS_GD_CALL = 26,
-  R_386_TLS_GD_POP = 27,
-  R_386_TLS_LDM_32 = 28,
-  R_386_TLS_LDM_PUSH = 29,
-  R_386_TLS_LDM_CALL = 30,
-  R_386_TLS_LDM_POP = 31,
-  R_386_TLS_LDO_32 = 32,
-  R_386_TLS_IE_32 = 33,
-  R_386_TLS_LE_32 = 34,
-  R_386_TLS_DTPMOD32 = 35,
-  R_386_TLS_DTPOFF32 = 36,
-  R_386_TLS_TPOFF32 = 37,
-  R_386_TLS_GOTDESC = 39,
-  R_386_TLS_DESC_CALL = 40,
-  R_386_TLS_DESC = 41,
+  R_386_TLS_GD_32 = 24,     // Initial General Dynamic reloc, sun-style
+  R_386_TLS_GD_PUSH = 25,   // Initial General Dynamic reloc, sun-style
+  R_386_TLS_GD_CALL = 26,   // Initial General Dynamic reloc, sun-style
+  R_386_TLS_GD_POP = 27,    // Initial General Dynamic reloc, sun-style
+  R_386_TLS_LDM_32 = 28,    // Initial Local Dynamic reloc, sun-style
+  R_386_TLS_LDM_PUSH = 29,  // Initial Local Dynamic reloc, sun-style
+  R_386_TLS_LDM_CALL = 30,  // Initial Local Dynamic reloc, sun-style
+  R_386_TLS_LDM_POP = 31,   // Initial Local Dynamic reloc, sun-style
+  R_386_TLS_LDO_32 = 32,    // Initial Local Dynamic reloc, sun+gnu styles
+  R_386_TLS_IE_32 = 33,     // Initial Initial Exec reloc, sun-style
+  R_386_TLS_LE_32 = 34,     // Initial Local Exec reloc, sun-style
+  R_386_TLS_DTPMOD32 = 35,  // Outstanding General/Local Dynamic reloc, sun+gnu
+  R_386_TLS_DTPOFF32 = 36,  // Outstanding General Dynamic reloc, sun+gnu
+  R_386_TLS_TPOFF32 = 37,   // Outstanding Initial Exec reloc, sun-style
+  R_386_TLS_GOTDESC = 39,   // GOT offset for TLS descriptor
+  R_386_TLS_DESC_CALL = 40, // Marker of call through TLS desc for relaxation
+  R_386_TLS_DESC = 41,      // TLS descriptor containing pointer to code and
+                            // to argument, returning TLS offset for symbol
+  R_386_IRELATIVE = 42,     // Adjust indirectly by program base
+  R_386_GOT32X = 43,        // 32 bit GOT entry, relaxable
   // Used by Intel.
   R_386_USED_BY_INTEL_200 = 200,
   // GNU vtable garbage collection extensions.
This page took 0.036545 seconds and 4 git commands to generate.