+2006-02-07 Paul Brook <paul@codesourcery.com>
+
+ * emultempl/armelf.em: Include elf/arm.h.
+ (arm_elf_finish): Set low address bit if enty point is a Thumb
+ function.
+
2006-02-01 Danny Smith <dannysmith@users.sourceforge.net>
* deffilep.y (def_image_name): If the image name does not have
test -z "$TARGET2_TYPE" && TARGET2_TYPE="rel"
cat >>e${EMULATION_NAME}.c <<EOF
+#include "elf/arm.h"
+
static char *thumb_entry_symbol = NULL;
static bfd *bfd_for_interwork;
static int byteswap_code = 0;
/* Call the elf32.em routine. */
gld${EMULATION_NAME}_finish ();
- if (thumb_entry_symbol == NULL)
- return;
+ if (thumb_entry_symbol)
+ {
+ h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
+ FALSE, FALSE, TRUE);
+ }
+ else
+ {
+ struct elf_link_hash_entry * eh;
+
+ if (!entry_symbol.name)
+ return;
+
+ h = bfd_link_hash_lookup (link_info.hash, entry_symbol.name,
+ FALSE, FALSE, TRUE);
+ eh = (struct elf_link_hash_entry *)h;
+ if (!h || ELF_ST_TYPE(eh->type) != STT_ARM_TFUNC)
+ return;
+ }
- h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
- FALSE, FALSE, TRUE);
if (h != (struct bfd_link_hash_entry *) NULL
&& (h->type == bfd_link_hash_defined
sprintf_vma (buffer + 2, val);
- if (entry_symbol.name != NULL && entry_from_cmdline)
+ if (thumb_entry_symbol != NULL && entry_symbol.name != NULL
+ && entry_from_cmdline)
einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
thumb_entry_symbol, entry_symbol.name);
entry_symbol.name = buffer;
+2006-02-07 Paul Brook <paul@codesourcery.com>
+
+ * ld-arm/arm-elf.exp: Add thumb-entry test.
+ * ld-arm/thumb-entry.d: New test.
+ * ld-arm/thumb-entry.s: New test.
+
2006-02-04 Richard Sandiford <richard@codesourcery.com>
* ld-mips-elf/tls-hidden2a.s, ld-mips-elf/tls-hidden2b.s,
{"TLS dynamic application" "-T arm-dyn.ld tmpdir/tls-lib.so" "" {tls-app.s}
{{objdump -fdw tls-app.d} {objdump -Rw tls-app.r}}
"tls-app"}
+ {"Thumb entry point" "-T arm.ld" "" {thumb-entry.s}
+ {{readelf -h thumb-entry.d}}
+ "thumb-entry"}
}
run_ld_link_tests $armelftests