This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] Thumb TLS broken
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Fri, 27 Jan 2006 00:42:54 +0000
- Subject: [patch] Thumb TLS broken
When assembling in thumb mode TLS objects are incorrectly given type
STT_ARM_16BIT instead of STT_TLS. The patch below tweaks
elf32_arm_get_symbol_type to give them the correct type.
Tested with cross to arm-none-eabi.
Ok?
Paul
2006-01-17 Paul Brook <paul@codesourcery.com>
* elf32-arm.c (elf32_arm_get_symbol_type): Allow STT_TLS thumb
objects.
Index: bfd/elf32-arm.c
===================================================================
RCS file: /var/cvsroot/src-cvs/src/bfd/elf32-arm.c,v
retrieving revision 1.62
diff -u -p -r1.62 elf32-arm.c
--- bfd/elf32-arm.c 11 Jan 2006 18:11:43 -0000 1.62
+++ bfd/elf32-arm.c 27 Jan 2006 00:32:17 -0000
@@ -5371,7 +5371,7 @@ elf32_arm_get_symbol_type (Elf_Internal_
This allows us to distinguish between data used by Thumb instructions
and non-data (which is probably code) inside Thumb regions of an
executable. */
- if (type != STT_OBJECT)
+ if (type != STT_OBJECT && type != STT_TLS)
return ELF_ST_TYPE (elf_sym->st_info);
break;