diff options
author | Christian Groessler <chris@groessler.org> | 2013-04-26 19:21:25 +0000 |
---|---|---|
committer | Christian Groessler <chris@groessler.org> | 2013-04-26 19:21:25 +0000 |
commit | 00a3147e7e9d3e08ff72bc002dc4b524af051d23 (patch) | |
tree | f5ac2a3b98ce9ed1848f536e545c24cd38e30c71 | |
parent | 778ee4a6f2f18eaf3a59a3bb950ed97ae892ed2a (diff) | |
download | gdb-00a3147e7e9d3e08ff72bc002dc4b524af051d23.zip gdb-00a3147e7e9d3e08ff72bc002dc4b524af051d23.tar.gz gdb-00a3147e7e9d3e08ff72bc002dc4b524af051d23.tar.bz2 |
* config/tc-z8k.c (md_parse_option): Set z8k_target_from_cmdline
according to the target parameter. Don't call s_segm since s_segm
calls bfd_set_arch_mach using stdoutput, but stdoutput isn't
initialized yet.
(md_begin): Call s_segm according to target parameter from command
line.
-rw-r--r-- | gas/ChangeLog | 9 | ||||
-rw-r--r-- | gas/config/tc-z8k.c | 13 |
2 files changed, 15 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 0fd3002..4f86c74 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2014-04-26 Christian Groessler <chris@groessler.org> + + * config/tc-z8k.c (md_parse_option): Set z8k_target_from_cmdline + according to the target parameter. Don't call s_segm since s_segm + calls bfd_set_arch_mach using stdoutput, but stdoutput isn't + initialized yet. + (md_begin): Call s_segm according to target parameter from command + line. + 2013-04-25 Alan Modra <amodra@gmail.com> * configure.in: Allow little-endian linux. diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c index 7cc061a..2442032 100644 --- a/gas/config/tc-z8k.c +++ b/gas/config/tc-z8k.c @@ -1,6 +1,6 @@ /* tc-z8k.c -- Assemble code for the Zilog Z800n Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2003, - 2005, 2006, 2007, 2009 Free Software Foundation, Inc. + 2005, 2006, 2007, 2009, 2013 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -34,7 +34,8 @@ extern int machine; extern int coff_flags; int segmented_mode; -/* This is non-zero if target was set from the command line. */ +/* This is non-zero if target was set from the command line. + If non-zero, 1 means Z8002 (non-segmented), 2 means Z8001 (segmented). */ static int z8k_target_from_cmdline; static void @@ -156,8 +157,7 @@ md_begin (void) } /* Default to z8002. */ - if (! z8k_target_from_cmdline) - s_segm (0); + s_segm (z8k_target_from_cmdline ? z8k_target_from_cmdline - 1 : 0); /* Insert the pseudo ops, too. */ for (idx = 0; md_pseudo_table[idx].poc_name; idx++) @@ -1310,15 +1310,14 @@ md_parse_option (int c, char *arg) { case 'z': if (!strcmp (arg, "8001")) - s_segm (1); + z8k_target_from_cmdline = 2; else if (!strcmp (arg, "8002")) - s_segm (0); + z8k_target_from_cmdline = 1; else { as_bad (_("invalid architecture -z%s"), arg); return 0; } - z8k_target_from_cmdline = 1; break; case OPTION_RELAX: |