mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-30 23:40:24 +00:00
17b9d67d4e
This is mostly just adding const in many places, however there are a couple interesting things. We need to add casts in tc-s390.c and tc-cris.c because they have functions that assign to input_line_pointer an argument that sometimes comes from md_parse_option. Presumably this is safe because those targets never pass literals to md_parse_option (), but this code should probably be improved in the future. Also xtensa passes the argument to strtoll which is a rather odd function, it takes a const char * as argument and returns a pointer into that string as a char * through an out argument, but we can work around that by adding more variables. gas/ChangeLog: 2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * config/tc-aarch64.c (struct aarch64_long_option_table): Ad const qualifier. * config/tc-alpha.c (md_parse_option): Likewise. * config/tc-arc.c (md_parse_option): Likewise. * config/tc-arm.c (struct arm_long_option_table): Likewise. (md_parse_option): Likewise. * config/tc-avr.c (md_parse_option): Likewise. * config/tc-bfin.c (md_parse_option): Likewise. * config/tc-cr16.c (md_parse_option): Likewise. * config/tc-cris.c (s_cris_arch): Likewise. (md_parse_option): Likewise. * config/tc-crx.c (md_parse_option): Likewise. * config/tc-d10v.c (md_parse_option): Likewise. * config/tc-d30v.c (md_parse_option): Likewise. * config/tc-dlx.c (md_parse_option): Likewise. * config/tc-epiphany.c (md_parse_option): Likewise. * config/tc-fr30.c (md_parse_option): Likewise. * config/tc-frv.c (md_parse_option): Likewise. * config/tc-ft32.c (md_parse_option): Likewise. * config/tc-h8300.c (md_parse_option): Likewise. * config/tc-hppa.c (md_parse_option): Likewise. * config/tc-i370.c (md_parse_option): Likewise. * config/tc-i386.c (md_parse_option): Likewise. * config/tc-i860.c (md_parse_option): Likewise. * config/tc-i960.c (md_parse_option): Likewise. * config/tc-ia64.c (md_parse_option): Likewise. * config/tc-ip2k.c (md_parse_option): Likewise. * config/tc-iq2000.c (md_parse_option): Likewise. * config/tc-lm32.c (md_parse_option): Likewise. * config/tc-m32c.c (md_parse_option): Likewise. * config/tc-m32r.c (md_parse_option): Likewise. * config/tc-m68hc11.c (md_parse_option): Likewise. * config/tc-m68k.c (md_parse_option): Likewise. * config/tc-mcore.c (md_parse_option): Likewise. * config/tc-mep.c (md_parse_option): Likewise. * config/tc-metag.c (struct metag_long_option): Likewise. (md_parse_option): Likewise. * config/tc-microblaze.c (md_parse_option): Likewise. * config/tc-microblaze.h (md_parse_option): Remove prototype. * config/tc-mips.c (md_parse_option): Adjust. * config/tc-mmix.c (md_parse_option): Likewise. * config/tc-mn10200.c (md_parse_option): Likewise. * config/tc-mn10300.c (md_parse_option): Likewise. * config/tc-moxie.c (md_parse_option): Likewise. * config/tc-msp430.c (md_parse_option): Likewise. * config/tc-mt.c (md_parse_option): Likewise. * config/tc-nds32.c (md_parse_option): Likewise. * config/tc-nds32.h (nds32_parse_option): Likewise. * config/tc-nios2.c (md_parse_option): Likewise. * config/tc-ns32k.c (md_parse_option): Likewise. * config/tc-or1k.c (md_parse_option): Likewise. * config/tc-pdp11.c (md_parse_option): Likewise. * config/tc-pj.c (md_parse_option): Likewise. * config/tc-ppc.c (md_parse_option): Likewise. * config/tc-rl78.c (md_parse_option): Likewise. * config/tc-rx.c (md_parse_option): Likewise. * config/tc-s390.c (s390_parse_cpu): Likewise. * config/tc-score.c (md_parse_option): Likewise. * config/tc-sh.c (md_parse_option): Likewise. * config/tc-sparc.c (md_parse_option): Likewise. * config/tc-spu.c (md_parse_option): Likewise. * config/tc-tic30.c (md_parse_option): Likewise. * config/tc-tic4x.c (md_parse_option): Likewise. * config/tc-tic54x.c (md_parse_option): Likewise. * config/tc-tic6x.c (md_parse_option): Likewise. * config/tc-tilegx.c (md_parse_option): Likewise. * config/tc-tilepro.c (md_parse_option): Likewise. * config/tc-v850.c (md_parse_option): Likewise. * config/tc-vax.c (md_parse_option): Likewise. * config/tc-visium.c (struct visium_long_option_table): Likewise. * config/tc-xc16x.c (md_parse_option): Likewise. * config/tc-xgate.c (md_parse_option): Likewise. * config/tc-xstormy16.c (md_parse_option): Likewise. * config/tc-xtensa.c (md_parse_option): Likewise. * config/tc-z80.c (md_parse_option): Likewise. * config/tc-z8k.c (md_parse_option): Likewise. * tc.h (md_parse_option): Likewise.
78 lines
2.3 KiB
C
78 lines
2.3 KiB
C
/* tc.h - target cpu dependent
|
|
|
|
Copyright (C) 1987-2016 Free Software Foundation, Inc.
|
|
|
|
This file is part of GAS, the GNU Assembler.
|
|
|
|
GAS is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3, or (at your option)
|
|
any later version.
|
|
|
|
GAS is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GAS; see the file COPYING. If not, write to
|
|
the Free Software Foundation, 51 Franklin Street - Fifth Floor,
|
|
Boston, MA 02110-1301, USA. */
|
|
|
|
/* In theory (mine, at least!) the machine dependent part of the assembler
|
|
should only have to include one file. This one. -- JF */
|
|
|
|
extern const pseudo_typeS md_pseudo_table[];
|
|
|
|
char * md_atof (int, char *, int *);
|
|
int md_parse_option (int, const char *);
|
|
void md_show_usage (FILE *);
|
|
void md_assemble (char *);
|
|
void md_begin (void);
|
|
#ifndef md_number_to_chars
|
|
void md_number_to_chars (char *, valueT, int);
|
|
#endif
|
|
void md_apply_fix (fixS *, valueT *, segT);
|
|
|
|
#ifndef WORKING_DOT_WORD
|
|
extern int md_short_jump_size;
|
|
extern int md_long_jump_size;
|
|
#endif
|
|
|
|
#ifdef TE_PE
|
|
/* The name of an external symbol which is
|
|
used to make weak PE symbol names unique. */
|
|
extern const char * an_external_name;
|
|
#endif
|
|
|
|
#ifndef md_create_long_jump
|
|
void md_create_long_jump (char *, addressT, addressT, fragS *, symbolS *);
|
|
#endif
|
|
#ifndef md_create_short_jump
|
|
void md_create_short_jump (char *, addressT, addressT, fragS *, symbolS *);
|
|
#endif
|
|
#ifndef md_pcrel_from
|
|
long md_pcrel_from (fixS *);
|
|
#endif
|
|
#ifndef md_operand
|
|
void md_operand (expressionS *);
|
|
#endif
|
|
#ifndef md_estimate_size_before_relax
|
|
int md_estimate_size_before_relax (fragS * fragP, segT);
|
|
#endif
|
|
#ifndef md_section_align
|
|
valueT md_section_align (segT, valueT);
|
|
#endif
|
|
#ifndef md_undefined_symbol
|
|
symbolS *md_undefined_symbol (char *);
|
|
#endif
|
|
|
|
#ifndef md_convert_frag
|
|
void md_convert_frag (bfd *, segT, fragS *);
|
|
#endif
|
|
#ifndef RELOC_EXPANSION_POSSIBLE
|
|
extern arelent *tc_gen_reloc (asection *, fixS *);
|
|
#else
|
|
extern arelent **tc_gen_reloc (asection *, fixS *);
|
|
#endif
|