summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-06-19 14:22:27 +0000
committerPaul Brook <paul@codesourcery.com>2006-06-19 14:22:27 +0000
commitb9e242fa0835b3e69cfb209085793a2ac780b613 (patch)
tree5826f02bcf48455e1e2629e014cdbf402083e2b9 /bfd
parentea895c5cd35086047fac9fb6cc15d91e257cf9a7 (diff)
downloadgdb-b9e242fa0835b3e69cfb209085793a2ac780b613.tar.gz
2006-06-19 Vladimir Prus <vladimir@codesourcery.com>
bfd/ * elf32-arm.c (elf32_arm_swap_symbol_out): Don't set low bit for undefined symbols. ld/testsuite * ld-arm/arm-elf.exp: New test. * ld-arm/use-thumb-lib.s: New file. * ld-arm/use-thumb-lib.sym: New file.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-arm.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5b1082245ef..f9477033681 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-19 Vladimir Prus <vladimir@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_swap_symbol_out): Don't set low
+ bit for undefined symbols.
+
2006-06-19 Alan Modra <amodra@bigpond.net.au>
* elf-bfd.h (struct elf_backend_data): Add bfd_link_info pointer
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index b360c934c28..bc7bcd1ceaa 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -9172,6 +9172,19 @@ elf32_arm_swap_symbol_out (bfd *abfd,
{
newsym = *src;
newsym.st_info = ELF_ST_INFO (ELF_ST_BIND (src->st_info), STT_FUNC);
+ if (newsym.st_shndx != SHN_UNDEF)
+ {
+ /* Do this only for defined symbols. At link type, the static
+ linker will simulate the work of dynamic linker of resolving
+ symbols and will carry over the thumbness of found symbols to
+ the output symbol table. It's not clear how it happens, but
+ the thumbness of underfined symbols can well be different at
+ runtime, and writing '1' for them will be confusing for users
+ and possibly for dynamic linker itself.
+ */
+ newsym.st_value |= 1;
+ }
+
newsym.st_value |= 1;
src = &newsym;