This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Assume interworking for EABIv3 objects.


The new arm EABI does not have a flag in the elf header for indicating thumb 
interworking support. However the ABI does require that objects are 
interworkable.
The patch below makes bfd assume it should enable thumb interworking for these 
object files.
This is only really a temporary fix until we come up with a replacement for 
the header flags.

Tested with cross to arm-none-elf.
Ok?

Paul

2004-08-25  Paul Brook  <paul@codesourcery.com>

	* INTERWORK_FLAG: Return true for EABIv3 objects.

Index: elf32-arm.h
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.h,v
retrieving revision 1.136
diff -u -p -r1.136 elf32-arm.h
--- elf32-arm.h	17 Aug 2004 08:12:26 -0000	1.136
+++ elf32-arm.h	25 Aug 2004 21:56:54 -0000
@@ -25,8 +25,10 @@
 typedef unsigned long int insn32;
 typedef unsigned short int insn16;
 
+/* In lieu of proper flags, assume all EABIv3 objects are interworkable.  */
 #define INTERWORK_FLAG(abfd)  \
-  (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK)
+  (EF_ARM_EABI_VERSION (elf_elfheader (abfd)->e_flags) == EF_ARM_EABI_VER3 \
+  || (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK))
 
 /* The linker script knows the section names for placement.
    The entry_names are used to do simple name mangling on the stubs.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]