From: Nick Clifton Date: Tue, 30 Mar 2004 08:53:05 +0000 (+0000) Subject: make use of meabi_flags be ELF specific X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7cc69913c20942a6f601bc2477fd881f1115df08;p=binutils-gdb.git make use of meabi_flags be ELF specific --- diff --git a/gas/ChangeLog b/gas/ChangeLog index a015f031eab..e4b55322c1e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2004-03-30 Nick Clifton + + * config/tc-arm.c (meabi_flags): Make its use conditional upon + OBJ_ELF being defined. + 2004-03-27 Alan Modra * config/obj-aout.c (obj_aout_type): Remove #ifdef BFD_ASSEMBLER code. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index bcf57692d13..a7ebc51ccd2 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -191,7 +191,9 @@ static int march_cpu_opt = -1; static int march_fpu_opt = -1; static int mfpu_opt = -1; static int mfloat_abi_opt = -1; +#ifdef OBJ_ELF static int meabi_flags = EF_ARM_EABI_UNKNOWN; +#endif /* This array holds the chars that always start a comment. If the 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_fpu PARAMS ((char *)); static int arm_parse_float_abi PARAMS ((char *)); +#ifdef OBJ_ELF static int arm_parse_eabi PARAMS ((char *)); +#endif #if 0 /* Suppressed - for now. */ #if defined OBJ_COFF || defined OBJ_ELF 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; -#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) { case EF_ARM_EABI_UNKNOWN: +#endif +#if defined OBJ_COFF || defined OBJ_ELF /* Set the flags in the private structure. */ if (uses_apcs_26) flags |= F_APCS26; if (support_interwork) flags |= F_INTERWORK; @@ -11701,9 +11709,8 @@ md_begin () if (pic_code) flags |= F_PIC; if ((cpu_variant & FPU_ANY) == FPU_NONE || (cpu_variant & FPU_ANY) == FPU_ARCH_VFP) /* VFP layout only. */ - { - flags |= F_SOFT_FLOAT; - } + flags |= F_SOFT_FLOAT; + switch (mfloat_abi_opt) { case ARM_FLOAT_ABI_SOFT: @@ -11716,13 +11723,14 @@ md_begin () as_bad (_("hard-float conflicts with specified fpu")); 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 (cpu_variant & FPU_ARCH_MAVERICK) flags |= EF_ARM_MAVERICK_FLOAT; -#endif break; case EF_ARM_EABI_VER3: @@ -11732,7 +11740,8 @@ md_begin () default: abort (); } - +#endif +#if defined OBJ_COFF || defined OBJ_ELF bfd_set_private_flags (stdoutput, flags); /* 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); } } - } #endif + } /* Record the CPU type as well. */ switch (cpu_variant & ARM_CPU_MASK) @@ -13470,6 +13479,7 @@ struct arm_eabi_option_table unsigned int value; }; +#ifdef OBJ_ELF /* We only know hot to output GNU and ver 3 (AAELF) formats. */ 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}, {NULL, 0} }; +#endif struct arm_long_option_table { @@ -13641,6 +13652,7 @@ arm_parse_float_abi (str) return 0; } +#ifdef OBJ_ELF static int arm_parse_eabi (str) char * str; @@ -13656,6 +13668,7 @@ arm_parse_eabi (str) as_bad (_("unknown EABI `%s'\n"), str); return 0; } +#endif struct arm_long_option_table arm_long_opts[] = { @@ -13667,8 +13680,10 @@ struct arm_long_option_table arm_long_opts[] = arm_parse_fpu, NULL}, {"mfloat-abi=", N_("\t assemble for floating point ABI "), arm_parse_float_abi, NULL}, +#ifdef OBJ_ELF {"meabi=", N_("\t assemble for eabi version "), arm_parse_eabi, NULL}, +#endif {NULL, NULL, 0, NULL} };