diff options
author | Nick Clifton <nickc@redhat.com> | 2002-08-27 11:01:55 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-08-27 11:01:55 +0000 |
commit | 0e67980c95d277b18016cdec4240a0e0a0a9ef09 (patch) | |
tree | 83f26efc34c84421e5833a4a58615c7a3b14f292 | |
parent | 339c6a3633db11751d936ed024de0990a8e05227 (diff) | |
download | gdb-0e67980c95d277b18016cdec4240a0e0a0a9ef09.tar.gz |
Revert ARM linker patch and apply similar patch to bfd instead
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.h | 25 |
2 files changed, 30 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d3631b0e659..2ea53bc9b8f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2002-08-27 Adam Nemet <anemet@lnxw.com> + + * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last + bit of DT_INIT and DT_FINI for Thumb functions. + 2002-08-26 Alan Modra <amodra@bigpond.net.au> * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC. diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index bfc1aa66a6a..5cd94347c31 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -3546,6 +3546,31 @@ elf32_arm_finish_dynamic_sections (output_bfd, info) } bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); break; + + /* Set the bottom bit of DT_INIT/FINI if the + corresponding function is Thumb. */ + case DT_INIT: + name = info->init_function; + goto get_sym; + case DT_FINI: + name = info->fini_function; + get_sym: + /* If it wasn't set by elf_bfd_final_link + then there is nothing to ajdust. */ + if (dyn.d_un.d_val != 0) + { + struct elf_link_hash_entry * eh; + + eh = elf_link_hash_lookup (elf_hash_table (info), name, + false, false, true); + if (eh != (struct elf_link_hash_entry *) NULL + && ELF_ST_TYPE (eh->type) == STT_ARM_TFUNC) + { + dyn.d_un.d_val |= 1; + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); + } + } + break; } } |