From: Claudiu Zissulescu Date: Tue, 12 Apr 2016 12:51:57 +0000 (+0200) Subject: [ARC] Fix setting private elf flags when parsing .cpu. X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=1adc8a9a7f48c5893c6a5e45384695732dd2f136;hp=8392fa22d69113602407281cbb364f29557c39b1;p=deliverable%2Fbinutils-gdb.git [ARC] Fix setting private elf flags when parsing .cpu. gas/ 2016-04-12 Claudiu Zissulescu * config/tc-arc.c (mach_type_specified_p): Change type to bfd_boolean. (arc_option): Set private flags when parsing cpu pseudo-op. (md_parse_option): Set mach_type_specified_p to TRUE. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 42ce34a2e9..92f3286d7f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2016-04-12 Claudiu Zissulescu + + * config/tc-arc.c (mach_type_specified_p): Change type to + bfd_boolean. + (arc_option): Set private flags when parsing cpu pseudo-op. + (md_parse_option): Set mach_type_specified_p to TRUE. + 2016-04-13 Nick Clifton PR target/19937 diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c index 7486924ae8..17e0b9aa22 100644 --- a/gas/config/tc-arc.c +++ b/gas/config/tc-arc.c @@ -396,8 +396,8 @@ static unsigned arc_features; /* The default architecture. */ static int arc_mach_type; -/* Non-zero if the cpu type has been explicitly specified. */ -static int mach_type_specified_p = 0; +/* TRUE if the cpu type has been explicitly specified. */ +static bfd_boolean mach_type_specified_p = FALSE; /* The hash table of instruction opcodes. */ static struct hash_control *arc_opcode_hash; @@ -902,6 +902,9 @@ arc_option (int ignore ATTRIBUTE_UNUSED) if (!bfd_set_arch_mach (stdoutput, bfd_arch_arc, mach)) as_fatal (_("could not set architecture and machine")); + + /* Set elf header flags. */ + bfd_set_private_flags (stdoutput, arc_eflag); } else if (arc_mach_type != mach) @@ -3156,7 +3159,7 @@ md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED) case OPTION_MCPU: { arc_select_cpu (arg); - mach_type_specified_p = 1; + mach_type_specified_p = TRUE; break; }