This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: NPTL support for MIPS

On Wed, Mar 16, 2005 at 03:06:00PM -0800, Roland McGrath wrote:
> > 	* elf/elf.h: Define MIPS TLS relocations.
> Assuming this ABI is now fully cooked and committed to all around, please
> post this patch separately and I'll put it in right away.

It is.  Here you go.

> > linuxthreads/
> > 	* descr.h (struct _pthread_descr_struct): Include padding if
> I believe Jakub has patches that address this for other machines in some
> other way.  Let's figure that all out before we add anything here.

I think that's a different issue.  What I remember seeing patches for
from Jakub was incompatibility between the LinuxThreads and NPTL, which have different size thread descriptors; if
expects it to be smaller (?) than the it loads, things
blow up.

This is entirely within LinuxThreads.  Both and
will try to access p_errno, which has to be at a common offset in this
structure.  This "padding" is unused in, but used in, and it lives before p_errno - so when it isn't included,
libc clobbers the wrong location in the descriptor when it tries to set

Daniel Jacobowitz
CodeSourcery, LLC

2005-03-16  Daniel Jacobowitz  <>

	* elf/elf.h: Define MIPS TLS relocations.

Index: glibc/elf/elf.h
--- glibc.orig/elf/elf.h	2005-03-15 17:48:07.000000000 -0500
+++ glibc/elf/elf.h	2005-03-16 14:37:49.305489074 -0500
@@ -1,5 +1,5 @@
 /* This file defines standard ELF types, structures, and macros.
-   Copyright (C) 1995-2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1995-2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    The GNU C Library is free software; you can redistribute it and/or
@@ -1491,8 +1491,21 @@ typedef struct
 #define R_MIPS_PJUMP		35
 #define R_MIPS_RELGOT		36
 #define R_MIPS_JALR		37
+#define R_MIPS_TLS_DTPMOD32	38
+#define R_MIPS_TLS_DTPREL32	39
+#define R_MIPS_TLS_DTPMOD64	40
+#define R_MIPS_TLS_DTPREL64	41
+#define R_MIPS_TLS_GD		42
+#define R_MIPS_TLS_LDM		43
+#define R_MIPS_TLS_DTPREL_HI16	44
+#define R_MIPS_TLS_DTPREL_LO16	45
+#define R_MIPS_TLS_TPREL32	47
+#define R_MIPS_TLS_TPREL64	48
+#define R_MIPS_TLS_TPREL_HI16	49
+#define R_MIPS_TLS_TPREL_LO16	50
 /* Keep this the last entry.  */
-#define R_MIPS_NUM		38
+#define R_MIPS_NUM		51
 /* Legal values for p_type field of Elf32_Phdr.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]