make use of meabi_flags be ELF specific

This commit is contained in:
Nick Clifton
2004-03-30 08:53:05 +00:00
parent 6dbf3ba0fa
commit 7cc69913c2
2 changed files with 30 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2004-03-30 Nick Clifton <nickc@redhat.com>
* config/tc-arm.c (meabi_flags): Make its use conditional upon
OBJ_ELF being defined.
2004-03-27 Alan Modra <amodra@bigpond.net.au> 2004-03-27 Alan Modra <amodra@bigpond.net.au>
* config/obj-aout.c (obj_aout_type): Remove #ifdef BFD_ASSEMBLER code. * config/obj-aout.c (obj_aout_type): Remove #ifdef BFD_ASSEMBLER code.

View File

@ -191,7 +191,9 @@ static int march_cpu_opt = -1;
static int march_fpu_opt = -1; static int march_fpu_opt = -1;
static int mfpu_opt = -1; static int mfpu_opt = -1;
static int mfloat_abi_opt = -1; static int mfloat_abi_opt = -1;
#ifdef OBJ_ELF
static int meabi_flags = EF_ARM_EABI_UNKNOWN; static int meabi_flags = EF_ARM_EABI_UNKNOWN;
#endif
/* This array holds the chars that always start a comment. If the /* This array holds the chars that always start a comment. If the
pre-processor is disabled, these aren't very useful. */ pre-processor is disabled, these aren't very useful. */
@ -2552,7 +2554,9 @@ static int arm_parse_cpu PARAMS ((char *));
static int arm_parse_arch PARAMS ((char *)); static int arm_parse_arch PARAMS ((char *));
static int arm_parse_fpu PARAMS ((char *)); static int arm_parse_fpu PARAMS ((char *));
static int arm_parse_float_abi PARAMS ((char *)); static int arm_parse_float_abi PARAMS ((char *));
#ifdef OBJ_ELF
static int arm_parse_eabi PARAMS ((char *)); static int arm_parse_eabi PARAMS ((char *));
#endif
#if 0 /* Suppressed - for now. */ #if 0 /* Suppressed - for now. */
#if defined OBJ_COFF || defined OBJ_ELF #if defined OBJ_COFF || defined OBJ_ELF
static void arm_add_note PARAMS ((const char *, const char *, unsigned int)); static void arm_add_note PARAMS ((const char *, const char *, unsigned int));
@ -11687,13 +11691,17 @@ md_begin ()
cpu_variant = mcpu_cpu_opt | mfpu_opt; cpu_variant = mcpu_cpu_opt | mfpu_opt;
#if defined OBJ_COFF || defined OBJ_ELF
{ {
unsigned int flags = meabi_flags; unsigned int flags = 0;
#if defined OBJ_ELF
flags = meabi_flags;
switch (meabi_flags) switch (meabi_flags)
{ {
case EF_ARM_EABI_UNKNOWN: case EF_ARM_EABI_UNKNOWN:
#endif
#if defined OBJ_COFF || defined OBJ_ELF
/* Set the flags in the private structure. */ /* Set the flags in the private structure. */
if (uses_apcs_26) flags |= F_APCS26; if (uses_apcs_26) flags |= F_APCS26;
if (support_interwork) flags |= F_INTERWORK; if (support_interwork) flags |= F_INTERWORK;
@ -11701,9 +11709,8 @@ md_begin ()
if (pic_code) flags |= F_PIC; if (pic_code) flags |= F_PIC;
if ((cpu_variant & FPU_ANY) == FPU_NONE if ((cpu_variant & FPU_ANY) == FPU_NONE
|| (cpu_variant & FPU_ANY) == FPU_ARCH_VFP) /* VFP layout only. */ || (cpu_variant & FPU_ANY) == FPU_ARCH_VFP) /* VFP layout only. */
{
flags |= F_SOFT_FLOAT; flags |= F_SOFT_FLOAT;
}
switch (mfloat_abi_opt) switch (mfloat_abi_opt)
{ {
case ARM_FLOAT_ABI_SOFT: case ARM_FLOAT_ABI_SOFT:
@ -11716,13 +11723,14 @@ md_begin ()
as_bad (_("hard-float conflicts with specified fpu")); as_bad (_("hard-float conflicts with specified fpu"));
break; break;
} }
/* Using VFP conventions (even if soft-float). */
if (cpu_variant & FPU_VFP_EXT_NONE) flags |= F_VFP_FLOAT;
/* Using VFP conventions (even if soft-float). */
if (cpu_variant & FPU_VFP_EXT_NONE)
flags |= F_VFP_FLOAT;
#endif
#if defined OBJ_ELF #if defined OBJ_ELF
if (cpu_variant & FPU_ARCH_MAVERICK) if (cpu_variant & FPU_ARCH_MAVERICK)
flags |= EF_ARM_MAVERICK_FLOAT; flags |= EF_ARM_MAVERICK_FLOAT;
#endif
break; break;
case EF_ARM_EABI_VER3: case EF_ARM_EABI_VER3:
@ -11732,7 +11740,8 @@ md_begin ()
default: default:
abort (); abort ();
} }
#endif
#if defined OBJ_COFF || defined OBJ_ELF
bfd_set_private_flags (stdoutput, flags); bfd_set_private_flags (stdoutput, flags);
/* We have run out flags in the COFF header to encode the /* We have run out flags in the COFF header to encode the
@ -11752,8 +11761,8 @@ md_begin ()
bfd_set_section_contents (stdoutput, sec, NULL, 0, 0); bfd_set_section_contents (stdoutput, sec, NULL, 0, 0);
} }
} }
}
#endif #endif
}
/* Record the CPU type as well. */ /* Record the CPU type as well. */
switch (cpu_variant & ARM_CPU_MASK) switch (cpu_variant & ARM_CPU_MASK)
@ -13470,6 +13479,7 @@ struct arm_eabi_option_table
unsigned int value; unsigned int value;
}; };
#ifdef OBJ_ELF
/* We only know hot to output GNU and ver 3 (AAELF) formats. */ /* We only know hot to output GNU and ver 3 (AAELF) formats. */
static struct arm_eabi_option_table arm_eabis[] = static struct arm_eabi_option_table arm_eabis[] =
{ {
@ -13477,6 +13487,7 @@ static struct arm_eabi_option_table arm_eabis[] =
{"3", EF_ARM_EABI_VER3}, {"3", EF_ARM_EABI_VER3},
{NULL, 0} {NULL, 0}
}; };
#endif
struct arm_long_option_table struct arm_long_option_table
{ {
@ -13641,6 +13652,7 @@ arm_parse_float_abi (str)
return 0; return 0;
} }
#ifdef OBJ_ELF
static int static int
arm_parse_eabi (str) arm_parse_eabi (str)
char * str; char * str;
@ -13656,6 +13668,7 @@ arm_parse_eabi (str)
as_bad (_("unknown EABI `%s'\n"), str); as_bad (_("unknown EABI `%s'\n"), str);
return 0; return 0;
} }
#endif
struct arm_long_option_table arm_long_opts[] = struct arm_long_option_table arm_long_opts[] =
{ {
@ -13667,8 +13680,10 @@ struct arm_long_option_table arm_long_opts[] =
arm_parse_fpu, NULL}, arm_parse_fpu, NULL},
{"mfloat-abi=", N_("<abi>\t assemble for floating point ABI <abi>"), {"mfloat-abi=", N_("<abi>\t assemble for floating point ABI <abi>"),
arm_parse_float_abi, NULL}, arm_parse_float_abi, NULL},
#ifdef OBJ_ELF
{"meabi=", N_("<ver>\t assemble for eabi version <ver>"), {"meabi=", N_("<ver>\t assemble for eabi version <ver>"),
arm_parse_eabi, NULL}, arm_parse_eabi, NULL},
#endif
{NULL, NULL, 0, NULL} {NULL, NULL, 0, NULL}
}; };