[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix builds of arm-wince-pe toolchain
From: |
Nick Clifton |
Subject: |
Fix builds of arm-wince-pe toolchain |
Date: |
18 Apr 2002 10:27:24 +0100 |
Hi Guys,
My previous patch to bfd/coff-arm.c introduced a bug that prevented
the arm-wince-pe toolchain from building. The patch below fixes
this and removes a few compile time warnings about functions being
defined but not used.
Cheers
Nick
2002-04-18 Nick Clifton <address@hidden>
* coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
insert_thumb_branch, record_thumb_to_arm_glue): Suppress
definition of these functions for ARM_WINCE builds as they are
not used.
(SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
for ARM_WINCE builds.
Index: bfd/coff-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-arm.c,v
retrieving revision 1.36
diff -c -3 -p -w -r1.36 coff-arm.c
*** bfd/coff-arm.c 4 Apr 2002 19:53:35 -0000 1.36
--- bfd/coff-arm.c 18 Apr 2002 09:23:17 -0000
*************** static bfd_reloc_status_type aoutarm_fix
*** 87,98 ****
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type aoutarm_fix_pcrel_26
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type coff_thumb_pcrel_23
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
- static bfd_reloc_status_type coff_thumb_pcrel_12
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type coff_thumb_pcrel_9
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type coff_arm_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean coff_arm_adjust_symndx
--- 87,102 ----
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type aoutarm_fix_pcrel_26
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ #ifndef ARM_WINCE
static bfd_reloc_status_type coff_thumb_pcrel_23
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type coff_thumb_pcrel_9
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ static insn32 insert_thumb_branch
+ PARAMS ((insn32, int));
+ #endif
+ static bfd_reloc_status_type coff_thumb_pcrel_12
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type coff_arm_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean coff_arm_adjust_symndx
*************** static const struct reloc_howto_struct *
*** 109,116 ****
PARAMS ((bfd *, bfd_reloc_code_real_type));
static struct bfd_link_hash_table * coff_arm_link_hash_table_create
PARAMS ((bfd *));
- static insn32 insert_thumb_branch
- PARAMS ((insn32, int));
static struct coff_link_hash_entry * find_thumb_glue
PARAMS ((struct bfd_link_info *, const char *, bfd *));
static struct coff_link_hash_entry * find_arm_glue
--- 113,118 ----
*************** static struct coff_link_hash_entry * fin
*** 118,126 ****
--- 120,130 ----
#ifndef COFF_IMAGE_WITH_PE
static void record_arm_to_thumb_glue
PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *));
+ #ifndef ARM_WINCE
static void record_thumb_to_arm_glue
PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *));
#endif
+ #endif
static boolean coff_arm_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static boolean coff_arm_print_private_bfd_data
*************** coff_thumb_pcrel_common (abfd, reloc_ent
*** 801,806 ****
--- 805,811 ----
return flag;
}
+ #ifndef ARM_WINCE
static bfd_reloc_status_type
coff_thumb_pcrel_23 (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
*************** coff_thumb_pcrel_23 (abfd, reloc_entry,
*** 818,824 ****
}
static bfd_reloc_status_type
! coff_thumb_pcrel_12 (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd;
arelent *reloc_entry;
--- 823,829 ----
}
static bfd_reloc_status_type
! coff_thumb_pcrel_9 (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd;
arelent *reloc_entry;
*************** coff_thumb_pcrel_12 (abfd, reloc_entry,
*** 830,840 ****
{
return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message,
! b12);
}
static bfd_reloc_status_type
! coff_thumb_pcrel_9 (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd;
arelent *reloc_entry;
--- 835,846 ----
{
return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message,
! b9);
}
+ #endif /* not ARM_WINCE */
static bfd_reloc_status_type
! coff_thumb_pcrel_12 (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd;
arelent *reloc_entry;
*************** coff_thumb_pcrel_9 (abfd, reloc_entry, s
*** 846,852 ****
{
return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message,
! b9);
}
static const struct reloc_howto_struct *
--- 852,858 ----
{
return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message,
! b12);
}
static const struct reloc_howto_struct *
*************** coff_arm_reloc_type_lookup (abfd, code)
*** 900,909 ****
--- 906,917 ----
#define BADMAG(x) ARMBADMAG(x)
#define ARM 1 /* Customize coffcode.h */
+ #ifndef ARM_WINCE
/* Make sure that the 'r_offset' field is copied properly
so that identical binaries will compare the same. */
#define SWAP_IN_RELOC_OFFSET H_GET_32
#define SWAP_OUT_RELOC_OFFSET H_PUT_32
+ #endif
/* Extend the coff_link_hash_table structure with a few ARM specific fields.
This allows us to store global data here without actually creating any
*************** arm_emit_base_file_entry (info, output_b
*** 975,980 ****
--- 983,989 ----
}
+ #ifndef ARM_WINCE
/* The thumb form of a long branch is a bit finicky, because the offset
encoding is split over two fields, each in it's own instruction. They
can occur in any order. So given a thumb form of long branch, and an
*************** insert_thumb_branch (br_insn, rel_off)
*** 1032,1037 ****
--- 1041,1047 ----
return br_insn;
}
+
static struct coff_link_hash_entry *
find_thumb_glue (info, name, input_bfd)
struct bfd_link_info *info;
*************** find_thumb_glue (info, name, input_bfd)
*** 1060,1065 ****
--- 1070,1076 ----
return myh;
}
+ #endif /* not ARM_WINCE */
static struct coff_link_hash_entry *
find_arm_glue (info, name, input_bfd)
*************** record_arm_to_thumb_glue (info, h)
*** 1914,1919 ****
--- 1925,1931 ----
return;
}
+ #ifndef ARM_WINCE
static void
record_thumb_to_arm_glue (info, h)
struct bfd_link_info * info;
*************** record_thumb_to_arm_glue (info, h)
*** 1987,1992 ****
--- 1999,2005 ----
return;
}
+ #endif /* not ARM_WINCE */
/* Select a BFD to be used to hold the sections used by the glue code.
This function is called from the linker scripts in ld/emultempl/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fix builds of arm-wince-pe toolchain,
Nick Clifton <=