a8eb42a8b7
Plus remove a few leftovers from the 29k support. include/ * aout/adobe.h: Delete. * aout/reloc.h: Delete. * coff/i860.h: Delete. * coff/i960.h: Delete. * elf/i860.h: Delete. * elf/i960.h: Delete. * opcode/i860.h: Delete. * opcode/i960.h: Delete. * aout/aout64.h (enum reloc_type): Trim off 29k and other unused values. * aout/ar.h (ARMAGB): Remove. * coff/internal.h (struct internal_aouthdr, struct internal_scnhdr, union internal_auxent): Remove i960 support. bfd/ * aout-adobe.c: Delete. * bout.c: Delete. * coff-i860.c: Delete. * coff-i960.c: Delete. * cpu-i860.c: Delete. * cpu-i960.c: Delete. * elf32-i860.c: Delete. * elf32-i960.c: Delete. * hosts/i860mach3.h: Delete. * Makefile.am: Remove i860, i960, bout, and adobe support. * archures.c: Remove i860 and i960 support. * coffcode.h: Likewise. * reloc.c: Likewise. * aoutx.h: Comment updates. * archive.c: Remove BOUT and i960 support. * bfd.c: Remove BOUT support. * coffswap.h: Remove i960 support. * config.bfd: Remove i860, i960 and adobe targets. * configure.ac: Remove adode, bout, i860, i960, icoff targets. * targets.c: Likewise. * ieee.c: Remove i960 support. * mach-o.c: Remove i860 support. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. opcodes/ * opcodes/i860-dis.c: Delete. * opcodes/i960-dis.c: Delete. * Makefile.am: Remove i860 and i960 support. * configure.ac: Likewise. * disassemble.c: Likewise. * disassemble.h: Likewise. * Makefile.in: Regenerate. * configure: Regenerate. * po/POTFILES.in: Regenerate. binutils/ * ieee.c: Remove i960 support. * od-macho.c: Remove i860 support. * readelf.c: Remove i860 and i960 support. * testsuite/binutils-all/objcopy.exp: Likewise. * testsuite/binutils-all/objdump.exp: Likewise. * testsuite/lib/binutils-common.exp: Likewise. gas/ * config/aout_gnu.h: Delete. * config/tc-i860.c: Delete. * config/tc-i860.h: Delete. * config/tc-i960.c: Delete. * config/tc-i960.h: Delete. * doc/c-i860.texi: Delete. * doc/c-i960.texi: Delete. * testsuite/gas/i860/README.i860: Delete. * testsuite/gas/i860/bitwise.d: Delete. * testsuite/gas/i860/bitwise.s: Delete. * testsuite/gas/i860/branch.d: Delete. * testsuite/gas/i860/branch.s: Delete. * testsuite/gas/i860/bte.d: Delete. * testsuite/gas/i860/bte.s: Delete. * testsuite/gas/i860/dir-align01.d: Delete. * testsuite/gas/i860/dir-align01.s: Delete. * testsuite/gas/i860/dir-intel01.d: Delete. * testsuite/gas/i860/dir-intel01.s: Delete. * testsuite/gas/i860/dir-intel02.d: Delete. * testsuite/gas/i860/dir-intel02.s: Delete. * testsuite/gas/i860/dir-intel03-err.l: Delete. * testsuite/gas/i860/dir-intel03-err.s: Delete. * testsuite/gas/i860/dual01.d: Delete. * testsuite/gas/i860/dual01.s: Delete. * testsuite/gas/i860/dual02-err.l: Delete. * testsuite/gas/i860/dual02-err.s: Delete. * testsuite/gas/i860/dual03.d: Delete. * testsuite/gas/i860/dual03.s: Delete. * testsuite/gas/i860/fldst01.d: Delete. * testsuite/gas/i860/fldst01.s: Delete. * testsuite/gas/i860/fldst02.d: Delete. * testsuite/gas/i860/fldst02.s: Delete. * testsuite/gas/i860/fldst03.d: Delete. * testsuite/gas/i860/fldst03.s: Delete. * testsuite/gas/i860/fldst04.d: Delete. * testsuite/gas/i860/fldst04.s: Delete. * testsuite/gas/i860/fldst05.d: Delete. * testsuite/gas/i860/fldst05.s: Delete. * testsuite/gas/i860/fldst06.d: Delete. * testsuite/gas/i860/fldst06.s: Delete. * testsuite/gas/i860/fldst07.d: Delete. * testsuite/gas/i860/fldst07.s: Delete. * testsuite/gas/i860/fldst08.d: Delete. * testsuite/gas/i860/fldst08.s: Delete. * testsuite/gas/i860/float01.d: Delete. * testsuite/gas/i860/float01.s: Delete. * testsuite/gas/i860/float02.d: Delete. * testsuite/gas/i860/float02.s: Delete. * testsuite/gas/i860/float03.d: Delete. * testsuite/gas/i860/float03.s: Delete. * testsuite/gas/i860/float04.d: Delete. * testsuite/gas/i860/float04.s: Delete. * testsuite/gas/i860/form.d: Delete. * testsuite/gas/i860/form.s: Delete. * testsuite/gas/i860/i860.exp: Delete. * testsuite/gas/i860/iarith.d: Delete. * testsuite/gas/i860/iarith.s: Delete. * testsuite/gas/i860/ldst01.d: Delete. * testsuite/gas/i860/ldst01.s: Delete. * testsuite/gas/i860/ldst02.d: Delete. * testsuite/gas/i860/ldst02.s: Delete. * testsuite/gas/i860/ldst03.d: Delete. * testsuite/gas/i860/ldst03.s: Delete. * testsuite/gas/i860/ldst04.d: Delete. * testsuite/gas/i860/ldst04.s: Delete. * testsuite/gas/i860/ldst05.d: Delete. * testsuite/gas/i860/ldst05.s: Delete. * testsuite/gas/i860/ldst06.d: Delete. * testsuite/gas/i860/ldst06.s: Delete. * testsuite/gas/i860/pfam.d: Delete. * testsuite/gas/i860/pfam.s: Delete. * testsuite/gas/i860/pfmam.d: Delete. * testsuite/gas/i860/pfmam.s: Delete. * testsuite/gas/i860/pfmsm.d: Delete. * testsuite/gas/i860/pfmsm.s: Delete. * testsuite/gas/i860/pfsm.d: Delete. * testsuite/gas/i860/pfsm.s: Delete. * testsuite/gas/i860/pseudo-ops01.d: Delete. * testsuite/gas/i860/pseudo-ops01.s: Delete. * testsuite/gas/i860/regress01.d: Delete. * testsuite/gas/i860/regress01.s: Delete. * testsuite/gas/i860/shift.d: Delete. * testsuite/gas/i860/shift.s: Delete. * testsuite/gas/i860/simd.d: Delete. * testsuite/gas/i860/simd.s: Delete. * testsuite/gas/i860/system.d: Delete. * testsuite/gas/i860/system.s: Delete. * testsuite/gas/i860/xp.d: Delete. * testsuite/gas/i860/xp.s: Delete. * Makefile.am: Remove i860 and i960 support. * configure.tgt: Likewise. * doc/Makefile.am: Likewise. * doc/all.texi: Likewise. * testsuite/gas/all/gas.exp * config/obj-coff.h: Remove i960 support. * doc/internals.texi: Likewise. * expr.c: Likewise. * read.c: Likewise. * write.c: Likewise. * write.h: Likewise. * testsuite/gas/lns/lns.exp: Likewise. * testsuite/gas/symver/symver.exp: Likewise. * config/tc-m68k.c: Remove BOUT support. * config/tc-score.c: Likewise. * config/tc-score7.c: Likewise. * config/tc-sparc.c: Likewise. * symbols.c: Likewise. * doc/h8.texi: Likewise. * configure.ac: Remove BOUT and i860 support. * doc/as.texinfo: Remove BOUT, i860 and i960 support * Makefile.in: Regenerate. * config.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * po/POTFILES.in: Regenerate. ld/ * emulparams/coff_i860.sh: Delete. * emulparams/elf32_i860.sh: Delete. * emulparams/elf32_i960.sh: Delete. * emulparams/gld960.sh: Delete. * emulparams/gld960coff.sh: Delete. * emulparams/lnk960.sh: Delete. * emultempl/gld960.em: Delete. * emultempl/gld960c.em: Delete. * emultempl/lnk960.em: Delete. * scripttempl/i860coff.sc: Delete. * scripttempl/i960.sc: Delete. * ld.texinfo: Remove i960 support. * Makefile.am: Remove i860 and i960 support. * configure.tgt: Likewise. * testsuite/ld-discard/extern.d: Likewise. * testsuite/ld-discard/start.d: Likewise. * testsuite/ld-discard/static.d: Likewise. * testsuite/ld-elf/compressed1d.d: Likewise. * testsuite/ld-elf/group1.d: Likewise. * testsuite/ld-elf/group3b.d: Likewise. * testsuite/ld-elf/group8a.d: Likewise. * testsuite/ld-elf/group8b.d: Likewise. * testsuite/ld-elf/group9a.d: Likewise. * testsuite/ld-elf/group9b.d: Likewise. * testsuite/ld-elf/linkonce2.d: Likewise. * testsuite/ld-elf/merge.d: Likewise. * testsuite/ld-elf/merge2.d: Likewise. * testsuite/ld-elf/merge3.d: Likewise. * testsuite/ld-elf/orphan-10.d: Likewise. * testsuite/ld-elf/orphan-11.d: Likewise. * testsuite/ld-elf/orphan-12.d: Likewise. * testsuite/ld-elf/orphan-9.d: Likewise. * testsuite/ld-elf/orphan-region.d: Likewise. * testsuite/ld-elf/orphan.d: Likewise. * testsuite/ld-elf/orphan3.d: Likewise. * testsuite/ld-elf/pr12851.d: Likewise. * testsuite/ld-elf/pr12975.d: Likewise. * testsuite/ld-elf/pr13177.d: Likewise. * testsuite/ld-elf/pr13195.d: Likewise. * testsuite/ld-elf/pr17550a.d: Likewise. * testsuite/ld-elf/pr17550b.d: Likewise. * testsuite/ld-elf/pr17550c.d: Likewise. * testsuite/ld-elf/pr17550d.d: Likewise. * testsuite/ld-elf/pr17615.d: Likewise. * testsuite/ld-elf/pr20528a.d: Likewise. * testsuite/ld-elf/pr20528b.d: Likewise. * testsuite/ld-elf/pr21562a.d: Likewise. * testsuite/ld-elf/pr21562b.d: Likewise. * testsuite/ld-elf/pr21562c.d: Likewise. * testsuite/ld-elf/pr21562d.d: Likewise. * testsuite/ld-elf/pr21562i.d: Likewise. * testsuite/ld-elf/pr21562j.d: Likewise. * testsuite/ld-elf/pr21562k.d: Likewise. * testsuite/ld-elf/pr21562l.d: Likewise. * testsuite/ld-elf/pr21562m.d: Likewise. * testsuite/ld-elf/pr21562n.d: Likewise. * testsuite/ld-elf/pr22677.d: Likewise. * testsuite/ld-elf/pr22836-1a.d: Likewise. * testsuite/ld-elf/pr22836-1b.d: Likewise. * testsuite/ld-elf/pr349.d: Likewise. * testsuite/ld-elf/sec-to-seg.exp: Likewise. * testsuite/ld-elf/sec64k.exp: Likewise. * testsuite/ld-elf/warn1.d: Likewise. * testsuite/ld-elf/warn2.d: Likewise. * testsuite/ld-elf/warn3.d: Likewise. * testsuite/lib/ld-lib.exp: Likewise. * Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate.
198 lines
5.8 KiB
C
198 lines
5.8 KiB
C
/* write.h
|
|
Copyright (C) 1987-2018 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. */
|
|
|
|
#ifndef __write_h__
|
|
#define __write_h__
|
|
|
|
/* This is the name of a fake symbol which will never appear in the
|
|
assembler output. S_IS_LOCAL detects it because of the \001. */
|
|
#ifndef FAKE_LABEL_NAME
|
|
#define FAKE_LABEL_NAME "L0\001"
|
|
#endif
|
|
|
|
/* This is a special character that is used to indicate a fake label.
|
|
It must be present in FAKE_LABEL_NAME, although it does not have to
|
|
be the first character. It must not be a character that would be
|
|
found in a valid symbol name.
|
|
|
|
Also be aware that the function _bfd_elf_is_local_label_name in
|
|
bfd/elf.c has an implicit assumption that FAKE_LABEL_CHAR is '\001'.
|
|
If this is not the case then FAKE_LABEL_NAME must start with ".L" in
|
|
order for the function to continue working. */
|
|
#ifndef FAKE_LABEL_CHAR
|
|
#define FAKE_LABEL_CHAR '\001'
|
|
#endif
|
|
|
|
#include "bit_fix.h"
|
|
|
|
/*
|
|
* FixSs may be built up in any order.
|
|
*/
|
|
|
|
struct fix
|
|
{
|
|
/* These small fields are grouped together for compactness of
|
|
this structure, and efficiency of access on some architectures. */
|
|
|
|
/* Is this a pc-relative relocation? */
|
|
unsigned fx_pcrel : 1;
|
|
|
|
/* Is this value an immediate displacement? */
|
|
/* Only used on ns32k; merge it into TC_FIX_TYPE sometime. */
|
|
unsigned fx_im_disp : 2;
|
|
|
|
/* Some bits for the CPU specific code. */
|
|
unsigned fx_tcbit : 1;
|
|
unsigned fx_tcbit2 : 1;
|
|
|
|
/* Has this relocation already been applied? */
|
|
unsigned fx_done : 1;
|
|
|
|
/* Suppress overflow complaints on large addends. This is used
|
|
in the PowerPC ELF config to allow large addends on the
|
|
BFD_RELOC_{LO16,HI16,HI16_S} relocations.
|
|
|
|
@@ Can this be determined from BFD? */
|
|
unsigned fx_no_overflow : 1;
|
|
|
|
/* The value is signed when checking for overflow. */
|
|
unsigned fx_signed : 1;
|
|
|
|
/* pc-relative offset adjust (only used by some CPU specific code) */
|
|
signed char fx_pcrel_adjust;
|
|
|
|
/* How many bytes are involved? */
|
|
unsigned char fx_size;
|
|
|
|
/* Which frag does this fix apply to? */
|
|
fragS *fx_frag;
|
|
|
|
/* Where is the first byte to fix up? */
|
|
long fx_where;
|
|
|
|
/* NULL or Symbol whose value we add in. */
|
|
symbolS *fx_addsy;
|
|
|
|
/* NULL or Symbol whose value we subtract. */
|
|
symbolS *fx_subsy;
|
|
|
|
/* Absolute number we add in. */
|
|
valueT fx_offset;
|
|
|
|
/* The value of dot when the fixup expression was parsed. */
|
|
addressT fx_dot_value;
|
|
|
|
/* The frag fx_dot_value is based on. */
|
|
fragS *fx_dot_frag;
|
|
|
|
/* Next fixS in linked list, or NULL. */
|
|
struct fix *fx_next;
|
|
|
|
/* If NULL, no bitfix's to do. */
|
|
bit_fixS *fx_bit_fixP;
|
|
|
|
bfd_reloc_code_real_type fx_r_type;
|
|
|
|
/* This field is sort of misnamed. It appears to be a sort of random
|
|
scratch field, for use by the back ends. The main gas code doesn't
|
|
do anything but initialize it to zero. The use of it does need to
|
|
be coordinated between the cpu and format files, though. E.g., some
|
|
coff targets pass the `addend' field from the cpu file via this
|
|
field. I don't know why the `fx_offset' field above can't be used
|
|
for that; investigate later and document. KR */
|
|
valueT fx_addnumber;
|
|
|
|
/* The location of the instruction which created the reloc, used
|
|
in error messages. */
|
|
const char *fx_file;
|
|
unsigned fx_line;
|
|
|
|
#ifdef USING_CGEN
|
|
struct {
|
|
/* CGEN_INSN entry for this instruction. */
|
|
const struct cgen_insn *insn;
|
|
/* Target specific data, usually reloc number. */
|
|
int opinfo;
|
|
/* Which ifield this fixup applies to. */
|
|
struct cgen_maybe_multi_ifield * field;
|
|
/* is this field is the MSB field in a set? */
|
|
int msb_field_p;
|
|
} fx_cgen;
|
|
#endif
|
|
|
|
#ifdef TC_FIX_TYPE
|
|
/* Location where a backend can attach additional data
|
|
needed to perform fixups. */
|
|
TC_FIX_TYPE tc_fix_data;
|
|
#endif
|
|
};
|
|
|
|
typedef struct fix fixS;
|
|
|
|
struct reloc_list
|
|
{
|
|
struct reloc_list *next;
|
|
union
|
|
{
|
|
struct
|
|
{
|
|
symbolS *offset_sym;
|
|
reloc_howto_type *howto;
|
|
symbolS *sym;
|
|
bfd_vma addend;
|
|
} a;
|
|
struct
|
|
{
|
|
asection *sec;
|
|
asymbol *s;
|
|
arelent r;
|
|
} b;
|
|
} u;
|
|
const char *file;
|
|
unsigned int line;
|
|
};
|
|
|
|
extern int finalize_syms;
|
|
extern symbolS *abs_section_sym;
|
|
extern addressT dot_value;
|
|
extern fragS *dot_frag;
|
|
extern struct reloc_list* reloc_list;
|
|
|
|
extern void append (char **, char *, unsigned long);
|
|
extern void record_alignment (segT, unsigned);
|
|
extern int get_recorded_alignment (segT);
|
|
extern void write_object_file (void);
|
|
extern long relax_frag (segT, fragS *, long);
|
|
extern int relax_segment (struct frag *, segT, int);
|
|
extern void number_to_chars_littleendian (char *, valueT, int);
|
|
extern void number_to_chars_bigendian (char *, valueT, int);
|
|
extern fixS *fix_new
|
|
(fragS * frag, int where, int size, symbolS * add_symbol,
|
|
offsetT offset, int pcrel, bfd_reloc_code_real_type r_type);
|
|
extern fixS *fix_at_start
|
|
(fragS * frag, int size, symbolS * add_symbol,
|
|
offsetT offset, int pcrel, bfd_reloc_code_real_type r_type);
|
|
extern fixS *fix_new_exp
|
|
(fragS * frag, int where, int size, expressionS *exp, int pcrel,
|
|
bfd_reloc_code_real_type r_type);
|
|
extern void write_print_statistics (FILE *);
|
|
|
|
#endif /* __write_h__ */
|