diff options
author | Paul Brook <paul@codesourcery.com> | 2006-06-19 14:22:27 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2006-06-19 14:22:27 +0000 |
commit | 0fa3dcad7e7c9674d050150a1e5c5d0f9454713f (patch) | |
tree | a28b62251caaa8a1988feb318075401e57200f49 /bfd/elf32-arm.c | |
parent | a6b96bebd2570d41149c9b90bc90c17599a44662 (diff) | |
download | gdb-0fa3dcad7e7c9674d050150a1e5c5d0f9454713f.zip gdb-0fa3dcad7e7c9674d050150a1e5c5d0f9454713f.tar.gz gdb-0fa3dcad7e7c9674d050150a1e5c5d0f9454713f.tar.bz2 |
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/elf32-arm.c')
-rw-r--r-- | bfd/elf32-arm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index b360c93..bc7bcd1 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; |