aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-08-27 11:01:55 +0000
committerNick Clifton <nickc@redhat.com>2002-08-27 11:01:55 +0000
commit88f7bcd5a785b91a33632bea6682c3d31f2df034 (patch)
treeb61a6f1f8d65b9370b0f72fafcf41c388ca92652 /bfd/elf32-arm.h
parentc2b8ed2c806135f28c880b614ab8728a8c2afa65 (diff)
downloadgdb-88f7bcd5a785b91a33632bea6682c3d31f2df034.zip
gdb-88f7bcd5a785b91a33632bea6682c3d31f2df034.tar.gz
gdb-88f7bcd5a785b91a33632bea6682c3d31f2df034.tar.bz2
Revert ARM linker patch and apply similar patch to bfd instead
Diffstat (limited to 'bfd/elf32-arm.h')
-rw-r--r--bfd/elf32-arm.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index bfc1aa6..5cd9434 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;
}
}