diff options
author | Alan Modra <amodra@gmail.com> | 2014-04-09 07:03:53 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-04-09 14:30:38 +0930 |
commit | bf7279d5358c47b90b89c4b6b5f8be9960120be2 (patch) | |
tree | de2582ff6fbf713bb62fbecdb89359f28b05969f /gas/read.c | |
parent | 62ebcb5cbedf0fdc0b5faaa05e46aa43ced2aa68 (diff) | |
download | gdb-bf7279d5358c47b90b89c4b6b5f8be9960120be2.zip gdb-bf7279d5358c47b90b89c4b6b5f8be9960120be2.tar.gz gdb-bf7279d5358c47b90b89c4b6b5f8be9960120be2.tar.bz2 |
ppc476 gas warn on data in code sections
* config/tc-ppc.c (warn_476, last_insn, last_seg, last_subseg):
New static vars.
(md_longopts, md_parse_option, md_show_usage): Add --ppc476-workaround.
(ppc_elf_cons_fix_check): New function.
(md_assemble): Set last_insn, last_seg, last_subseg.
(ppc_byte, md_apply_fix): Handle warn_476.
* config/tc-ppc.h (TC_CONS_FIX_CHECK): Define.
(ppc_elf_cons_fix_check): Declare.
* read.c (cons_worker): Invoke TC_CONS_FIX_CHECK.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -3918,6 +3918,12 @@ cons_worker (int nbytes, /* 1=.byte, 2=.word, 4=.long. */ do { TC_PARSE_CONS_RETURN_TYPE ret = TC_PARSE_CONS_RETURN_NONE; +#ifdef TC_CONS_FIX_CHECK + fixS **cur_fix = &frchain_now->fix_tail; + + if (*cur_fix != NULL) + cur_fix = &(*cur_fix)->fx_next; +#endif #ifdef TC_M68K if (flag_m68k_mri) @@ -3942,6 +3948,9 @@ cons_worker (int nbytes, /* 1=.byte, 2=.word, 4=.long. */ as_fatal (_("rva without symbol")); } emit_expr_with_reloc (&exp, (unsigned int) nbytes, ret); +#ifdef TC_CONS_FIX_CHECK + TC_CONS_FIX_CHECK (&exp, nbytes, *cur_fix); +#endif ++c; } while (*input_line_pointer++ == ','); |