* config.bfd: Add bfd_elf32_rx_be_ns_vec.
* target.c: Likewise. * configure.in: Likewise. * configure.in: Regenerate. * elf32-rx.c: Add elf32-rx-be-ns target. (rx_elf_object_p): Never allow the be-ns target by default, only allow it if the user requests it.
This commit is contained in:
parent
a39ef33120
commit
4c422395e6
|
@ -1,3 +1,13 @@
|
|||
2011-06-01 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* config.bfd: Add bfd_elf32_rx_be_ns_vec.
|
||||
* target.c: Likewise.
|
||||
* configure.in: Likewise.
|
||||
* configure.in: Regenerate.
|
||||
* elf32-rx.c: Add elf32-rx-be-ns target.
|
||||
(rx_elf_object_p): Never allow the be-ns target by default,
|
||||
only allow it if the user requests it.
|
||||
|
||||
2011-06-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
|
||||
|
|
|
@ -1189,7 +1189,7 @@ case "${targ}" in
|
|||
|
||||
rx-*-elf)
|
||||
targ_defvec=bfd_elf32_rx_le_vec
|
||||
targ_selvecs="bfd_elf32_rx_be_vec bfd_elf32_rx_le_vec"
|
||||
targ_selvecs="bfd_elf32_rx_be_vec bfd_elf32_rx_le_vec bfd_elf32_rx_be_ns_vec"
|
||||
;;
|
||||
|
||||
s390-*-linux*)
|
||||
|
|
|
@ -15264,6 +15264,7 @@ do
|
|||
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_rx_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_rx_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_rx_be_ns_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
|
||||
bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
|
||||
|
|
|
@ -763,6 +763,7 @@ do
|
|||
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_rx_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_rx_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_rx_be_ns_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
|
||||
bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
|
||||
#define RX_OPCODE_BIG_ENDIAN 0
|
||||
|
||||
/* This is a meta-target that's used only with objcopy, to avoid the
|
||||
endian-swap we would otherwise get. We check for this in
|
||||
rx_elf_object_p(). */
|
||||
const bfd_target bfd_elf32_rx_be_ns_vec;
|
||||
|
||||
#ifdef DEBUG
|
||||
char * rx_get_reloc (long);
|
||||
void rx_dump_symtab (bfd *, void *, void *);
|
||||
|
@ -2960,6 +2965,13 @@ rx_elf_object_p (bfd * abfd)
|
|||
int nphdrs = elf_elfheader (abfd)->e_phnum;
|
||||
sec_ptr bsec;
|
||||
|
||||
/* We never want to automatically choose the non-swapping big-endian
|
||||
target. The user can only get that explicitly, such as with -I
|
||||
and objcopy. */
|
||||
if (abfd->xvec == &bfd_elf32_rx_be_ns_vec
|
||||
&& abfd->target_defaulted)
|
||||
return FALSE;
|
||||
|
||||
bfd_default_set_arch_mach (abfd, bfd_arch_rx,
|
||||
elf32_rx_machine (abfd));
|
||||
|
||||
|
@ -3436,3 +3448,21 @@ elf32_rx_modify_program_headers (bfd * abfd ATTRIBUTE_UNUSED,
|
|||
#define bfd_elf32_bfd_relax_section elf32_rx_relax_section_wrapper
|
||||
|
||||
#include "elf32-target.h"
|
||||
|
||||
/* We define a second big-endian target that doesn't have the custom
|
||||
section get/set hooks, for times when we want to preserve the
|
||||
pre-swapped .text sections (like objcopy). */
|
||||
|
||||
#undef TARGET_BIG_SYM
|
||||
#define TARGET_BIG_SYM bfd_elf32_rx_be_ns_vec
|
||||
#undef TARGET_BIG_NAME
|
||||
#define TARGET_BIG_NAME "elf32-rx-be-ns"
|
||||
#undef TARGET_LITTLE_SYM
|
||||
|
||||
#undef bfd_elf32_get_section_contents
|
||||
#undef bfd_elf32_set_section_contents
|
||||
|
||||
#undef elf32_bed
|
||||
#define elf32_bed elf32_rx_be_ns_bed
|
||||
|
||||
#include "elf32-target.h"
|
||||
|
|
|
@ -657,6 +657,7 @@ extern const bfd_target bfd_elf32_powerpcle_vec;
|
|||
extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
|
||||
extern const bfd_target bfd_elf32_rx_le_vec;
|
||||
extern const bfd_target bfd_elf32_rx_be_vec;
|
||||
extern const bfd_target bfd_elf32_rx_be_ns_vec;
|
||||
extern const bfd_target bfd_elf32_s390_vec;
|
||||
extern const bfd_target bfd_elf32_bigscore_vec;
|
||||
extern const bfd_target bfd_elf32_littlescore_vec;
|
||||
|
@ -1014,6 +1015,7 @@ static const bfd_target * const _bfd_target_vector[] =
|
|||
&bfd_elf32_powerpc_vxworks_vec,
|
||||
&bfd_elf32_powerpcle_vec,
|
||||
&bfd_elf32_rx_be_vec,
|
||||
&bfd_elf32_rx_be_ns_vec,
|
||||
&bfd_elf32_rx_le_vec,
|
||||
&bfd_elf32_s390_vec,
|
||||
#ifdef BFD64
|
||||
|
|
Loading…
Reference in New Issue