This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

[PATCH] MIPS bfd: Don't place TLS symbols in .scommon


Hello All,

I applied the appended patch, it fixes the tls_common testcase for
MIPS.


Thiemo


2006-08-14  Thiemo Seufer  <ths@mips.com>

	* elfxx-mips.c (_bfd_mips_elf_symbol_processing,
	_bfd_mips_elf_add_symbol_hook): Don't try to place small common TLS
	symbols in .scommon.


Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.179
diff -u -p -r1.179 elfxx-mips.c
--- bfd/elfxx-mips.c	11 Aug 2006 13:55:38 -0000	1.179
+++ bfd/elfxx-mips.c	14 Aug 2006 12:17:59 -0000
@@ -5095,6 +5095,7 @@ _bfd_mips_elf_symbol_processing (bfd *ab
       /* Common symbols less than the GP size are automatically
 	 treated as SHN_MIPS_SCOMMON symbols on IRIX5.  */
       if (asym->value > elf_gp_size (abfd)
+	  || ELF_ST_TYPE (elfsym->internal_elf_sym.st_info) == STT_TLS
 	  || IRIX_COMPAT (abfd) == ict_irix6)
 	break;
       /* Fall through.  */
@@ -5735,6 +5736,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd
       /* Common symbols less than the GP size are automatically
 	 treated as SHN_MIPS_SCOMMON symbols.  */
       if (sym->st_size > elf_gp_size (abfd)
+	  || ELF_ST_TYPE (sym->st_info) == STT_TLS
 	  || IRIX_COMPAT (abfd) == ict_irix6)
 	break;
       /* Fall through.  */


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