1999-05-03 07:29:11 +00:00
|
|
|
/* ECOFF object file format.
|
2015-01-01 14:15:26 +00:00
|
|
|
Copyright (C) 1993-2015 Free Software Foundation, Inc.
|
1999-05-03 07:29:11 +00:00
|
|
|
Contributed by Cygnus Support.
|
|
|
|
This file was put together by Ian Lance Taylor <ian@cygnus.com>.
|
|
|
|
|
|
|
|
This file is part of GAS.
|
|
|
|
|
|
|
|
GAS is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-07-03 11:01:12 +00:00
|
|
|
the Free Software Foundation; either version 3, or (at your option)
|
1999-05-03 07:29:11 +00:00
|
|
|
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
|
2005-05-05 09:13:19 +00:00
|
|
|
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
|
|
|
02110-1301, USA. */
|
1999-05-03 07:29:11 +00:00
|
|
|
|
|
|
|
#define OBJ_HEADER "obj-ecoff.h"
|
|
|
|
#include "as.h"
|
|
|
|
#include "coff/internal.h"
|
|
|
|
#include "bfd/libcoff.h"
|
|
|
|
#include "bfd/libecoff.h"
|
|
|
|
|
|
|
|
/* Almost all of the ECOFF support is actually in ecoff.c in the main
|
|
|
|
gas directory. This file mostly just arranges to call that one at
|
|
|
|
the right times. */
|
|
|
|
|
2002-09-05 00:01:18 +00:00
|
|
|
/* Set section VMAs and GP values before reloc processing. */
|
1999-05-03 07:29:11 +00:00
|
|
|
|
|
|
|
void
|
2005-03-24 20:40:28 +00:00
|
|
|
ecoff_frob_file_before_fix (void)
|
1999-05-03 07:29:11 +00:00
|
|
|
{
|
|
|
|
bfd_vma addr;
|
2005-05-03 17:08:43 +00:00
|
|
|
asection *sec;
|
1999-05-03 07:29:11 +00:00
|
|
|
|
|
|
|
/* Set the section VMA values. We force the .sdata and .sbss
|
|
|
|
sections to the end to ensure that their VMA addresses are close
|
|
|
|
together so that the GP register can address both of them. We
|
|
|
|
put the .bss section after the .sbss section.
|
|
|
|
|
|
|
|
Also, for the Alpha, we must sort the sections, to make sure they
|
|
|
|
appear in the output file in the correct order. (Actually, maybe
|
|
|
|
this is a job for BFD. But the VMAs computed would be out of
|
|
|
|
whack if we computed them given our initial, random ordering.
|
|
|
|
It's possible that that wouldn't break things; I could do some
|
|
|
|
experimenting sometime and find out.
|
|
|
|
|
|
|
|
This output ordering of sections is magic, on the Alpha, at
|
|
|
|
least. The .lita section must come before .lit8 and .lit4,
|
|
|
|
otherwise the OSF/1 linker may silently trash the .lit{4,8}
|
|
|
|
section contents. Also, .text must preceed .rdata. These differ
|
|
|
|
from the order described in some parts of the DEC OSF/1 Assembly
|
|
|
|
Language Programmer's Guide, but that order doesn't seem to work
|
|
|
|
with their linker.
|
|
|
|
|
|
|
|
I don't know if section ordering on the MIPS is important. */
|
|
|
|
|
2005-03-24 20:40:28 +00:00
|
|
|
static const char *const names[] =
|
|
|
|
{
|
1999-05-03 07:29:11 +00:00
|
|
|
/* text segment */
|
|
|
|
".text", ".rdata", ".init", ".fini",
|
|
|
|
/* data segment */
|
|
|
|
".data", ".lita", ".lit8", ".lit4", ".sdata", ".got",
|
|
|
|
/* bss segment */
|
|
|
|
".sbss", ".bss",
|
|
|
|
};
|
2001-05-03 02:07:02 +00:00
|
|
|
#define n_names ((int) (sizeof (names) / sizeof (names[0])))
|
1999-05-03 07:29:11 +00:00
|
|
|
|
2002-01-05 13:13:18 +00:00
|
|
|
/* Sections that match names, order to be straightened out later. */
|
|
|
|
asection *secs[n_names];
|
|
|
|
int i;
|
|
|
|
|
1999-05-03 07:29:11 +00:00
|
|
|
addr = 0;
|
2002-01-05 13:13:18 +00:00
|
|
|
for (i = 0; i < n_names; i++)
|
2005-05-03 12:02:47 +00:00
|
|
|
secs[i] = NULL;
|
2002-01-05 13:13:18 +00:00
|
|
|
|
2005-05-03 17:08:43 +00:00
|
|
|
for (sec = stdoutput->sections; sec != NULL; sec = sec->next)
|
2002-01-05 13:13:18 +00:00
|
|
|
{
|
|
|
|
for (i = 0; i < n_names; i++)
|
2005-05-03 17:08:43 +00:00
|
|
|
if (!strcmp (sec->name, names[i]))
|
1999-05-03 07:29:11 +00:00
|
|
|
{
|
2005-05-03 17:08:43 +00:00
|
|
|
secs[i] = sec;
|
|
|
|
bfd_section_list_remove (stdoutput, sec);
|
2002-01-05 13:13:18 +00:00
|
|
|
break;
|
1999-05-03 07:29:11 +00:00
|
|
|
}
|
2002-01-05 13:13:18 +00:00
|
|
|
if (i == n_names)
|
1999-05-03 07:29:11 +00:00
|
|
|
{
|
2005-05-03 17:08:43 +00:00
|
|
|
bfd_set_section_vma (stdoutput, sec, addr);
|
|
|
|
addr += bfd_section_size (stdoutput, sec);
|
1999-05-03 07:29:11 +00:00
|
|
|
}
|
2002-01-05 13:13:18 +00:00
|
|
|
}
|
|
|
|
for (i = 0; i < n_names; i++)
|
|
|
|
if (secs[i])
|
|
|
|
{
|
|
|
|
bfd_set_section_vma (stdoutput, secs[i], addr);
|
|
|
|
addr += bfd_section_size (stdoutput, secs[i]);
|
|
|
|
}
|
|
|
|
for (i = n_names - 1; i >= 0; i--)
|
|
|
|
if (secs[i])
|
2005-05-03 17:08:43 +00:00
|
|
|
bfd_section_list_prepend (stdoutput, secs[i]);
|
1999-05-03 07:29:11 +00:00
|
|
|
|
2002-09-05 00:01:18 +00:00
|
|
|
/* Fill in the register masks. */
|
|
|
|
{
|
|
|
|
unsigned long gprmask = 0;
|
|
|
|
unsigned long fprmask = 0;
|
|
|
|
unsigned long *cprmask = NULL;
|
|
|
|
|
|
|
|
#ifdef TC_MIPS
|
|
|
|
/* Fill in the MIPS register masks. It's probably not worth
|
|
|
|
setting up a generic interface for this. */
|
|
|
|
gprmask = mips_gprmask;
|
|
|
|
cprmask = mips_cprmask;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef TC_ALPHA
|
|
|
|
alpha_frob_ecoff_data ();
|
|
|
|
|
|
|
|
if (! bfd_ecoff_set_gp_value (stdoutput, alpha_gp_value))
|
|
|
|
as_fatal (_("Can't set GP value"));
|
|
|
|
|
|
|
|
gprmask = alpha_gprmask;
|
|
|
|
fprmask = alpha_fprmask;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (! bfd_ecoff_set_regmasks (stdoutput, gprmask, fprmask, cprmask))
|
|
|
|
as_fatal (_("Can't set register masks"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Swap out the symbols and debugging information for BFD. */
|
|
|
|
|
|
|
|
void
|
2005-03-24 20:40:28 +00:00
|
|
|
ecoff_frob_file (void)
|
2002-09-05 00:01:18 +00:00
|
|
|
{
|
|
|
|
const struct ecoff_debug_swap * const debug_swap
|
|
|
|
= &ecoff_backend (stdoutput)->debug_swap;
|
2002-12-12 22:46:47 +00:00
|
|
|
bfd_vma addr ATTRIBUTE_UNUSED;
|
2002-09-05 00:01:18 +00:00
|
|
|
HDRR *hdr;
|
|
|
|
char *buf;
|
|
|
|
char *set;
|
|
|
|
|
1999-05-03 07:29:11 +00:00
|
|
|
/* Build the ECOFF debugging information. */
|
* gas/app, gas/as.c, gas/as.h, gas/atof-generic.c, gas/cgen.c,
gas/config/atof-ieee.c, gas/config/obj-aout.c,
gas/config/obj-coff.c, gas/config/obj-ecoff.c,
gas/config/obj-elf.c, gas/config/obj-som.c, gas/config/tc-alpha.c,
gas/config/tc-arc.c, gas/config/tc-arm.c, gas/config/tc-cr16.c,
gas/config/tc-cris.c, gas/config/tc-crx.c, gas/config/tc-d30v.c,
gas/config/tc-dlx.c, gas/config/tc-hppa.c, gas/config/tc-i370.c,
gas/config/tc-i386-intel.c, gas/config/tc-i386.c,
gas/config/tc-i860.c, gas/config/tc-i960.c, gas/config/tc-ia64.c,
gas/config/tc-iq2000.c, gas/config/tc-m32c.c,
gas/config/tc-m32r.c, gas/config/tc-m68hc11.c,
gas/config/tc-m68k.c, gas/config/tc-maxq.c, gas/config/tc-mcore.c,
gas/config/tc-mep.c, gas/config/tc-mips.c, gas/config/tc-mmix.c,
gas/config/tc-mn10300.c, gas/config/tc-moxie.c,
gas/config/tc-ns32k.c, gas/config/tc-pj.c, gas/config/tc-ppc.c,
gas/config/tc-s390.c, gas/config/tc-score.c,
gas/config/tc-score7.c, gas/config/tc-sh.c, gas/config/tc-sparc.c,
gas/config/tc-spu.c, gas/config/tc-tic30.c, gas/config/tc-vax.c,
gas/config/tc-xtensa.c, gas/config/xtensa-relax.c,
gas/dw2gencfi.c, gas/dwarf2dbg.c, gas/ehopt.c, gas/expr.c,
gas/frags.c, gas/input-file.c, gas/read.c, gas/sb.c,
gas/subsegs.c, gas/symbols.c, gas/write.c: Change the name of the
gas macro `assert' to `gas_assert'.
2009-06-22 17:56:02 +00:00
|
|
|
gas_assert (ecoff_data (stdoutput) != 0);
|
1999-05-03 07:29:11 +00:00
|
|
|
hdr = &ecoff_data (stdoutput)->debug_info.symbolic_header;
|
|
|
|
ecoff_build_debug (hdr, &buf, debug_swap);
|
|
|
|
|
|
|
|
/* Finish up the ecoff_tdata structure. */
|
|
|
|
set = buf;
|
|
|
|
#define SET(ptr, count, type, size) \
|
|
|
|
if (hdr->count == 0) \
|
2005-03-24 20:40:28 +00:00
|
|
|
ecoff_data (stdoutput)->debug_info.ptr = NULL; \
|
1999-05-03 07:29:11 +00:00
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
ecoff_data (stdoutput)->debug_info.ptr = (type) set; \
|
|
|
|
set += hdr->count * size; \
|
|
|
|
}
|
|
|
|
|
|
|
|
SET (line, cbLine, unsigned char *, sizeof (unsigned char));
|
2005-03-24 20:40:28 +00:00
|
|
|
SET (external_dnr, idnMax, void *, debug_swap->external_dnr_size);
|
|
|
|
SET (external_pdr, ipdMax, void *, debug_swap->external_pdr_size);
|
|
|
|
SET (external_sym, isymMax, void *, debug_swap->external_sym_size);
|
|
|
|
SET (external_opt, ioptMax, void *, debug_swap->external_opt_size);
|
1999-05-03 07:29:11 +00:00
|
|
|
SET (external_aux, iauxMax, union aux_ext *, sizeof (union aux_ext));
|
|
|
|
SET (ss, issMax, char *, sizeof (char));
|
|
|
|
SET (ssext, issExtMax, char *, sizeof (char));
|
2005-03-24 20:40:28 +00:00
|
|
|
SET (external_rfd, crfd, void *, debug_swap->external_rfd_size);
|
|
|
|
SET (external_fdr, ifdMax, void *, debug_swap->external_fdr_size);
|
|
|
|
SET (external_ext, iextMax, void *, debug_swap->external_ext_size);
|
1999-05-03 07:29:11 +00:00
|
|
|
#undef SET
|
|
|
|
}
|
|
|
|
|
|
|
|
/* This is called by the ECOFF code to set the external information
|
|
|
|
for a symbol. We just pass it on to BFD, which expects the swapped
|
|
|
|
information to be stored in the native field of the symbol. */
|
|
|
|
|
|
|
|
void
|
2005-03-24 20:40:28 +00:00
|
|
|
obj_ecoff_set_ext (symbolS *sym, EXTR *ext)
|
1999-05-03 07:29:11 +00:00
|
|
|
{
|
|
|
|
const struct ecoff_debug_swap * const debug_swap
|
|
|
|
= &ecoff_backend (stdoutput)->debug_swap;
|
|
|
|
ecoff_symbol_type *esym;
|
|
|
|
|
1999-06-22 14:17:55 +00:00
|
|
|
know (bfd_asymbol_flavour (symbol_get_bfdsym (sym))
|
|
|
|
== bfd_target_ecoff_flavour);
|
|
|
|
esym = ecoffsymbol (symbol_get_bfdsym (sym));
|
2002-11-30 08:39:46 +00:00
|
|
|
esym->local = FALSE;
|
1999-05-03 07:29:11 +00:00
|
|
|
esym->native = xmalloc (debug_swap->external_ext_size);
|
|
|
|
(*debug_swap->swap_ext_out) (stdoutput, ext, esym->native);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2005-03-24 20:40:28 +00:00
|
|
|
ecoff_sec_sym_ok_for_reloc (asection *sec ATTRIBUTE_UNUSED)
|
1999-05-03 07:29:11 +00:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2005-03-24 20:40:28 +00:00
|
|
|
obj_ecoff_frob_symbol (symbolS *sym, int *puntp ATTRIBUTE_UNUSED)
|
1999-05-03 07:29:11 +00:00
|
|
|
{
|
|
|
|
ecoff_frob_symbol (sym);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2005-03-24 20:40:28 +00:00
|
|
|
ecoff_pop_insert (void)
|
1999-05-03 07:29:11 +00:00
|
|
|
{
|
|
|
|
pop_insert (obj_pseudo_table);
|
|
|
|
}
|
|
|
|
|
* obj.h (struct format_ops): New members begin, app_file,
s_set_other, s_set_desc, s_get_type, s_set_type,
separate_stab_sections, init_stab_section.
* config/obj-multi.h: Update GPL notice to v2.
(obj_begin): New.
(obj_app_file): New.
(S_SET_SIZE): Test s_set_size for NULL before calling.
(S_SET_ALIGN): Similar for s_set_align.
(S_SET_OTHER): New.
(S_SET_DESC): New.
(S_GET_TYPE): New.
(S_SET_TYPE): New.
(SEPARATE_STAB_SECTIONS): New.
(INIT_STAB_SECTION): New.
(EMIT_SECTION_SYMBOLS): New.
(AOUT_STABS) [OBJ_MAYBE_AOUT]: Define.
* config/obj-elf.h: Update GPL notice to v2.
Mention that this file is included from obj-multi.h.
(obj_begin): Wrap definition in ifndef.
(elf_file_symbol): Constify declaration.
(obj_app_file): Ditto.
(SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
Wrap in ifndef SEPARATE_STAB_SECTIONS.
* config/obj-elf.c (elf_s_set_other): New.
(elf_file_symbol): Constify argument.
(elf_separate_stab_sections): New.
(elf_init_stab_section): New.
(elf_format_ops): Add new members. Remove comma at end.
* config/obj-ecoff.c (ecoff_separate_stab_sections): New.
(ecoff_format_ops): Add new fields. Remove comma at end.
Mention inconsistency for emit_section_symbols.
* config/obj-coff.h (c_dot_file_symbol): Constify declaration.
* config/obj-coff.c (c_dot_file_symbol): Constify argument.
(coff_separate_stab_sections): New.
(coff_format_ops): Add new members.
* config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New.
(obj_aout_s_set_other): New.
(obj_aout_s_set_desc): New.
(obj_aout_s_get_type): New.
(obj_aout_s_set_type): New.
(obj_aout_separate_stab_sections): New.
(aout_format_ops): New members added. Use obj_aout_process_stab,
not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0.
(obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as
appropriate.
(obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
2000-05-22 21:19:43 +00:00
|
|
|
static int
|
2005-03-24 20:40:28 +00:00
|
|
|
ecoff_separate_stab_sections (void)
|
* obj.h (struct format_ops): New members begin, app_file,
s_set_other, s_set_desc, s_get_type, s_set_type,
separate_stab_sections, init_stab_section.
* config/obj-multi.h: Update GPL notice to v2.
(obj_begin): New.
(obj_app_file): New.
(S_SET_SIZE): Test s_set_size for NULL before calling.
(S_SET_ALIGN): Similar for s_set_align.
(S_SET_OTHER): New.
(S_SET_DESC): New.
(S_GET_TYPE): New.
(S_SET_TYPE): New.
(SEPARATE_STAB_SECTIONS): New.
(INIT_STAB_SECTION): New.
(EMIT_SECTION_SYMBOLS): New.
(AOUT_STABS) [OBJ_MAYBE_AOUT]: Define.
* config/obj-elf.h: Update GPL notice to v2.
Mention that this file is included from obj-multi.h.
(obj_begin): Wrap definition in ifndef.
(elf_file_symbol): Constify declaration.
(obj_app_file): Ditto.
(SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
Wrap in ifndef SEPARATE_STAB_SECTIONS.
* config/obj-elf.c (elf_s_set_other): New.
(elf_file_symbol): Constify argument.
(elf_separate_stab_sections): New.
(elf_init_stab_section): New.
(elf_format_ops): Add new members. Remove comma at end.
* config/obj-ecoff.c (ecoff_separate_stab_sections): New.
(ecoff_format_ops): Add new fields. Remove comma at end.
Mention inconsistency for emit_section_symbols.
* config/obj-coff.h (c_dot_file_symbol): Constify declaration.
* config/obj-coff.c (c_dot_file_symbol): Constify argument.
(coff_separate_stab_sections): New.
(coff_format_ops): Add new members.
* config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New.
(obj_aout_s_set_other): New.
(obj_aout_s_set_desc): New.
(obj_aout_s_get_type): New.
(obj_aout_s_set_type): New.
(obj_aout_separate_stab_sections): New.
(aout_format_ops): New members added. Use obj_aout_process_stab,
not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0.
(obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as
appropriate.
(obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
2000-05-22 21:19:43 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-03-24 20:40:28 +00:00
|
|
|
/* These are the pseudo-ops we support in this file. Only those
|
|
|
|
relating to debugging information are supported here.
|
|
|
|
|
|
|
|
The following pseudo-ops from the Kane and Heinrich MIPS book
|
|
|
|
should be defined here, but are currently unsupported: .aent,
|
|
|
|
.bgnb, .endb, .verstamp, .vreg.
|
|
|
|
|
|
|
|
The following pseudo-ops from the Kane and Heinrich MIPS book are
|
|
|
|
MIPS CPU specific, and should be defined by tc-mips.c: .alias,
|
|
|
|
.extern, .galive, .gjaldef, .gjrlive, .livereg, .noalias, .option,
|
|
|
|
.rdata, .sdata, .set.
|
|
|
|
|
|
|
|
The following pseudo-ops from the Kane and Heinrich MIPS book are
|
|
|
|
not MIPS CPU specific, but are also not ECOFF specific. I have
|
|
|
|
only listed the ones which are not already in read.c. It's not
|
|
|
|
completely clear where these should be defined, but tc-mips.c is
|
|
|
|
probably the most reasonable place: .asciiz, .asm0, .endr, .err,
|
|
|
|
.half, .lab, .repeat, .struct, .weakext. */
|
|
|
|
|
|
|
|
const pseudo_typeS obj_pseudo_table[] =
|
|
|
|
{
|
|
|
|
/* COFF style debugging information. .ln is not used; .loc is used
|
|
|
|
instead. */
|
|
|
|
{ "def", ecoff_directive_def, 0 },
|
|
|
|
{ "dim", ecoff_directive_dim, 0 },
|
|
|
|
{ "endef", ecoff_directive_endef, 0 },
|
|
|
|
{ "file", ecoff_directive_file, 0 },
|
|
|
|
{ "scl", ecoff_directive_scl, 0 },
|
|
|
|
{ "size", ecoff_directive_size, 0 },
|
|
|
|
{ "esize", ecoff_directive_size, 0 },
|
|
|
|
{ "tag", ecoff_directive_tag, 0 },
|
|
|
|
{ "type", ecoff_directive_type, 0 },
|
|
|
|
{ "etype", ecoff_directive_type, 0 },
|
|
|
|
{ "val", ecoff_directive_val, 0 },
|
|
|
|
|
|
|
|
/* ECOFF specific debugging information. */
|
|
|
|
{ "begin", ecoff_directive_begin, 0 },
|
|
|
|
{ "bend", ecoff_directive_bend, 0 },
|
|
|
|
{ "end", ecoff_directive_end, 0 },
|
|
|
|
{ "ent", ecoff_directive_ent, 0 },
|
|
|
|
{ "fmask", ecoff_directive_fmask, 0 },
|
|
|
|
{ "frame", ecoff_directive_frame, 0 },
|
|
|
|
{ "loc", ecoff_directive_loc, 0 },
|
|
|
|
{ "mask", ecoff_directive_mask, 0 },
|
|
|
|
|
|
|
|
/* Other ECOFF directives. */
|
|
|
|
{ "extern", ecoff_directive_extern, 0 },
|
|
|
|
|
|
|
|
#ifndef TC_MIPS
|
|
|
|
/* For TC_MIPS, tc-mips.c adds this. */
|
|
|
|
{ "weakext", ecoff_directive_weakext, 0 },
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* These are used on Irix. I don't know how to implement them. */
|
|
|
|
{ "bgnb", s_ignore, 0 },
|
|
|
|
{ "endb", s_ignore, 0 },
|
|
|
|
{ "verstamp", s_ignore, 0 },
|
|
|
|
|
|
|
|
/* Sentinel. */
|
|
|
|
{ NULL, s_ignore, 0 }
|
|
|
|
};
|
|
|
|
|
1999-05-03 07:29:11 +00:00
|
|
|
const struct format_ops ecoff_format_ops =
|
|
|
|
{
|
|
|
|
bfd_target_ecoff_flavour,
|
2005-03-24 20:40:28 +00:00
|
|
|
0, /* dfl_leading_underscore. */
|
* obj.h (struct format_ops): New members begin, app_file,
s_set_other, s_set_desc, s_get_type, s_set_type,
separate_stab_sections, init_stab_section.
* config/obj-multi.h: Update GPL notice to v2.
(obj_begin): New.
(obj_app_file): New.
(S_SET_SIZE): Test s_set_size for NULL before calling.
(S_SET_ALIGN): Similar for s_set_align.
(S_SET_OTHER): New.
(S_SET_DESC): New.
(S_GET_TYPE): New.
(S_SET_TYPE): New.
(SEPARATE_STAB_SECTIONS): New.
(INIT_STAB_SECTION): New.
(EMIT_SECTION_SYMBOLS): New.
(AOUT_STABS) [OBJ_MAYBE_AOUT]: Define.
* config/obj-elf.h: Update GPL notice to v2.
Mention that this file is included from obj-multi.h.
(obj_begin): Wrap definition in ifndef.
(elf_file_symbol): Constify declaration.
(obj_app_file): Ditto.
(SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
Wrap in ifndef SEPARATE_STAB_SECTIONS.
* config/obj-elf.c (elf_s_set_other): New.
(elf_file_symbol): Constify argument.
(elf_separate_stab_sections): New.
(elf_init_stab_section): New.
(elf_format_ops): Add new members. Remove comma at end.
* config/obj-ecoff.c (ecoff_separate_stab_sections): New.
(ecoff_format_ops): Add new fields. Remove comma at end.
Mention inconsistency for emit_section_symbols.
* config/obj-coff.h (c_dot_file_symbol): Constify declaration.
* config/obj-coff.c (c_dot_file_symbol): Constify argument.
(coff_separate_stab_sections): New.
(coff_format_ops): Add new members.
* config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New.
(obj_aout_s_set_other): New.
(obj_aout_s_set_desc): New.
(obj_aout_s_get_type): New.
(obj_aout_s_set_type): New.
(obj_aout_separate_stab_sections): New.
(aout_format_ops): New members added. Use obj_aout_process_stab,
not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0.
(obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as
appropriate.
(obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
2000-05-22 21:19:43 +00:00
|
|
|
|
|
|
|
/* FIXME: A comment why emit_section_symbols is different here (1) from
|
|
|
|
the single-format definition (0) would be in order. */
|
2005-03-24 20:40:28 +00:00
|
|
|
1, /* emit_section_symbols. */
|
|
|
|
0, /* begin. */
|
* obj.h (struct format_ops): New members begin, app_file,
s_set_other, s_set_desc, s_get_type, s_set_type,
separate_stab_sections, init_stab_section.
* config/obj-multi.h: Update GPL notice to v2.
(obj_begin): New.
(obj_app_file): New.
(S_SET_SIZE): Test s_set_size for NULL before calling.
(S_SET_ALIGN): Similar for s_set_align.
(S_SET_OTHER): New.
(S_SET_DESC): New.
(S_GET_TYPE): New.
(S_SET_TYPE): New.
(SEPARATE_STAB_SECTIONS): New.
(INIT_STAB_SECTION): New.
(EMIT_SECTION_SYMBOLS): New.
(AOUT_STABS) [OBJ_MAYBE_AOUT]: Define.
* config/obj-elf.h: Update GPL notice to v2.
Mention that this file is included from obj-multi.h.
(obj_begin): Wrap definition in ifndef.
(elf_file_symbol): Constify declaration.
(obj_app_file): Ditto.
(SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
Wrap in ifndef SEPARATE_STAB_SECTIONS.
* config/obj-elf.c (elf_s_set_other): New.
(elf_file_symbol): Constify argument.
(elf_separate_stab_sections): New.
(elf_init_stab_section): New.
(elf_format_ops): Add new members. Remove comma at end.
* config/obj-ecoff.c (ecoff_separate_stab_sections): New.
(ecoff_format_ops): Add new fields. Remove comma at end.
Mention inconsistency for emit_section_symbols.
* config/obj-coff.h (c_dot_file_symbol): Constify declaration.
* config/obj-coff.c (c_dot_file_symbol): Constify argument.
(coff_separate_stab_sections): New.
(coff_format_ops): Add new members.
* config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New.
(obj_aout_s_set_other): New.
(obj_aout_s_set_desc): New.
(obj_aout_s_get_type): New.
(obj_aout_s_set_type): New.
(obj_aout_separate_stab_sections): New.
(aout_format_ops): New members added. Use obj_aout_process_stab,
not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0.
(obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as
appropriate.
(obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
2000-05-22 21:19:43 +00:00
|
|
|
ecoff_new_file,
|
1999-05-03 07:29:11 +00:00
|
|
|
obj_ecoff_frob_symbol,
|
|
|
|
ecoff_frob_file,
|
2005-03-24 20:40:28 +00:00
|
|
|
0, /* frob_file_before_adjust. */
|
2002-09-05 00:01:18 +00:00
|
|
|
ecoff_frob_file_before_fix,
|
2005-03-24 20:40:28 +00:00
|
|
|
0, /* frob_file_after_relocs. */
|
|
|
|
0, /* s_get_size. */
|
|
|
|
0, /* s_set_size. */
|
|
|
|
0, /* s_get_align. */
|
|
|
|
0, /* s_set_align. */
|
|
|
|
0, /* s_get_other. */
|
|
|
|
0, /* s_set_other. */
|
|
|
|
0, /* s_get_desc. */
|
|
|
|
0, /* s_set_desc. */
|
|
|
|
0, /* s_get_type. */
|
|
|
|
0, /* s_set_type. */
|
|
|
|
0, /* copy_symbol_attributes. */
|
1999-05-03 07:29:11 +00:00
|
|
|
ecoff_generate_asm_lineno,
|
|
|
|
ecoff_stab,
|
* obj.h (struct format_ops): New members begin, app_file,
s_set_other, s_set_desc, s_get_type, s_set_type,
separate_stab_sections, init_stab_section.
* config/obj-multi.h: Update GPL notice to v2.
(obj_begin): New.
(obj_app_file): New.
(S_SET_SIZE): Test s_set_size for NULL before calling.
(S_SET_ALIGN): Similar for s_set_align.
(S_SET_OTHER): New.
(S_SET_DESC): New.
(S_GET_TYPE): New.
(S_SET_TYPE): New.
(SEPARATE_STAB_SECTIONS): New.
(INIT_STAB_SECTION): New.
(EMIT_SECTION_SYMBOLS): New.
(AOUT_STABS) [OBJ_MAYBE_AOUT]: Define.
* config/obj-elf.h: Update GPL notice to v2.
Mention that this file is included from obj-multi.h.
(obj_begin): Wrap definition in ifndef.
(elf_file_symbol): Constify declaration.
(obj_app_file): Ditto.
(SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
Wrap in ifndef SEPARATE_STAB_SECTIONS.
* config/obj-elf.c (elf_s_set_other): New.
(elf_file_symbol): Constify argument.
(elf_separate_stab_sections): New.
(elf_init_stab_section): New.
(elf_format_ops): Add new members. Remove comma at end.
* config/obj-ecoff.c (ecoff_separate_stab_sections): New.
(ecoff_format_ops): Add new fields. Remove comma at end.
Mention inconsistency for emit_section_symbols.
* config/obj-coff.h (c_dot_file_symbol): Constify declaration.
* config/obj-coff.c (c_dot_file_symbol): Constify argument.
(coff_separate_stab_sections): New.
(coff_format_ops): Add new members.
* config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New.
(obj_aout_s_set_other): New.
(obj_aout_s_set_desc): New.
(obj_aout_s_get_type): New.
(obj_aout_s_set_type): New.
(obj_aout_separate_stab_sections): New.
(aout_format_ops): New members added. Use obj_aout_process_stab,
not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0.
(obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as
appropriate.
(obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
2000-05-22 21:19:43 +00:00
|
|
|
ecoff_separate_stab_sections,
|
2005-03-24 20:40:28 +00:00
|
|
|
0, /* init_stab_section. */
|
1999-05-03 07:29:11 +00:00
|
|
|
ecoff_sec_sym_ok_for_reloc,
|
|
|
|
ecoff_pop_insert,
|
|
|
|
ecoff_set_ext,
|
|
|
|
ecoff_read_begin_hook,
|
2009-11-02 11:49:48 +00:00
|
|
|
ecoff_symbol_new_hook,
|
2010-10-25 12:38:42 +00:00
|
|
|
ecoff_symbol_clone_hook,
|
|
|
|
0 /* adjust_symtab. */
|
1999-05-03 07:29:11 +00:00
|
|
|
};
|