projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ARC] Fix and extend features of .cpu directive.
[deliverable/binutils-gdb.git]
/
gas
/
ecoff.c
diff --git
a/gas/ecoff.c
b/gas/ecoff.c
index 1103be2477a6b3f4cbb84aded78016a517d18552..a5fc62cc4baec72b555d99d0ff40f48e285c5602 100644
(file)
--- a/
gas/ecoff.c
+++ b/
gas/ecoff.c
@@
-1,6
+1,5
@@
/* ECOFF debugging support.
/* ECOFF debugging support.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright (C) 1993-2016 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
good deal of it comes directly from mips-tfile.c, by Michael
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
good deal of it comes directly from mips-tfile.c, by Michael
@@
-10,7
+9,7
@@
GAS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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
2
, or (at your option)
+ 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,
any later version.
GAS is distributed in the hope that it will be useful,
@@
-20,14
+19,13
@@
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
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, 5
9 Temple Place - Suite 330
, Boston, MA
- 0211
1-1307
, USA. */
+ Software Foundation, 5
1 Franklin Street - Fifth Floor
, Boston, MA
+ 0211
0-1301
, USA. */
#include "as.h"
/* This file is compiled conditionally for those targets which use
#include "as.h"
/* This file is compiled conditionally for those targets which use
- ECOFF debugging information (e.g., MIPS ECOFF, MIPS ELF, Alpha
- ECOFF). */
+ ECOFF debugging information (e.g., MIPS ELF, Alpha ECOFF). */
#include "ecoff.h"
#include "ecoff.h"
@@
-36,7
+34,7
@@
#include "coff/internal.h"
#include "coff/symconst.h"
#include "aout/stab_gnu.h"
#include "coff/internal.h"
#include "coff/symconst.h"
#include "aout/stab_gnu.h"
-
+#include "filenames.h"
#include "safe-ctype.h"
/* Why isn't this in coff/sym.h? */
#include "safe-ctype.h"
/* Why isn't this in coff/sym.h? */
@@
-1505,6
+1503,16
@@
ecoff_symbol_new_hook (symbolS *symbolP)
obj->ecoff_symbol = NULL;
obj->ecoff_extern_size = 0;
}
obj->ecoff_symbol = NULL;
obj->ecoff_extern_size = 0;
}
+
+void
+ecoff_symbol_clone_hook (symbolS *newsymP, symbolS *orgsymP)
+{
+ OBJ_SYMFIELD_TYPE *n, *o;
+
+ n = symbol_get_obj (newsymP);
+ o = symbol_get_obj (orgsymP);
+ memcpy (n, o, sizeof *n);
+}
\f
/* Add a page to a varray object. */
\f
/* Add a page to a varray object. */
@@
-1544,8
+1552,8
@@
add_string (varray_t *vp, /* string obstack */
const char *str, /* string */
shash_t **ret_hash /* return hash pointer */)
{
const char *str, /* string */
shash_t **ret_hash /* return hash pointer */)
{
-
register
unsigned long len = strlen (str);
-
register
shash_t *hash_ptr;
+ unsigned long len = strlen (str);
+ shash_t *hash_ptr;
if (len >= PAGE_USIZE)
as_fatal (_("string too big (%lu bytes)"), len);
if (len >= PAGE_USIZE)
as_fatal (_("string too big (%lu bytes)"), len);
@@
-1553,7
+1561,7
@@
add_string (varray_t *vp, /* string obstack */
hash_ptr = (shash_t *) hash_find (hash_tbl, str);
if (hash_ptr == (shash_t *) NULL)
{
hash_ptr = (shash_t *) hash_find (hash_tbl, str);
if (hash_ptr == (shash_t *) NULL)
{
-
register
const char *err;
+ const char *err;
if (vp->objects_last_page + len >= PAGE_USIZE)
{
if (vp->objects_last_page + len >= PAGE_USIZE)
{
@@
-1596,12
+1604,12
@@
add_ecoff_symbol (const char *str, /* symbol name */
symint_t indx /* index to local/aux. syms */)
{
localsym_t *psym;
symint_t indx /* index to local/aux. syms */)
{
localsym_t *psym;
-
register
scope_t *pscope;
-
register
thead_t *ptag_head;
-
register
tag_t *ptag;
-
register
tag_t *ptag_next;
-
register
varray_t *vp;
-
register
int scope_delta = 0;
+ scope_t *pscope;
+ thead_t *ptag_head;
+ tag_t *ptag;
+ tag_t *ptag_next;
+ varray_t *vp;
+ int scope_delta = 0;
shash_t *hash_ptr = (shash_t *) NULL;
if (cur_file_ptr == (efdr_t *) NULL)
shash_t *hash_ptr = (shash_t *) NULL;
if (cur_file_ptr == (efdr_t *) NULL)
@@
-1744,7
+1752,7
@@
add_ecoff_symbol (const char *str, /* symbol name */
ty = add_aux_sym_tir (&last_func_type_info,
hash_no,
&cur_file_ptr->thash_head[0]);
ty = add_aux_sym_tir (&last_func_type_info,
hash_no,
&cur_file_ptr->thash_head[0]);
-
+ (void) ty;
/* This seems to be unnecessary. I'm not even sure what it is
* intended to do. It's from mips-tfile.
* if (last_func_sym_value != (symbolS *) NULL)
/* This seems to be unnecessary. I'm not even sure what it is
* intended to do. It's from mips-tfile.
* if (last_func_sym_value != (symbolS *) NULL)
@@
-1794,8
+1802,8
@@
add_ecoff_symbol (const char *str, /* symbol name */
static symint_t
add_aux_sym_symint (symint_t aux_word /* auxiliary information word */)
{
static symint_t
add_aux_sym_symint (symint_t aux_word /* auxiliary information word */)
{
-
register
varray_t *vp;
-
register
aux_t *aux_ptr;
+ varray_t *vp;
+ aux_t *aux_ptr;
if (cur_file_ptr == (efdr_t *) NULL)
as_fatal (_("no current file pointer"));
if (cur_file_ptr == (efdr_t *) NULL)
as_fatal (_("no current file pointer"));
@@
-1817,8
+1825,8
@@
add_aux_sym_symint (symint_t aux_word /* auxiliary information word */)
static symint_t
add_aux_sym_rndx (int file_index, symint_t sym_index)
{
static symint_t
add_aux_sym_rndx (int file_index, symint_t sym_index)
{
-
register
varray_t *vp;
-
register
aux_t *aux_ptr;
+ varray_t *vp;
+ aux_t *aux_ptr;
if (cur_file_ptr == (efdr_t *) NULL)
as_fatal (_("no current file pointer"));
if (cur_file_ptr == (efdr_t *) NULL)
as_fatal (_("no current file pointer"));
@@
-1844,8
+1852,8
@@
add_aux_sym_tir (type_info_t *t, /* current type information */
hash_state_t state, /* whether to hash type or not */
thash_t **hash_tbl /* pointer to hash table to use */)
{
hash_state_t state, /* whether to hash type or not */
thash_t **hash_tbl /* pointer to hash table to use */)
{
-
register
varray_t *vp;
-
register
aux_t *aux_ptr;
+ varray_t *vp;
+ aux_t *aux_ptr;
static AUXU init_aux;
symint_t ret;
int i;
static AUXU init_aux;
symint_t ret;
int i;
@@
-1892,8
+1900,8
@@
add_aux_sym_tir (type_info_t *t, /* current type information */
if (state != hash_no)
{
if (state != hash_no)
{
-
register
thash_t *hash_ptr;
-
register
symint_t hi;
+ thash_t *hash_ptr;
+ symint_t hi;
hi = aux.isym & ((1 << HASHBITS) - 1);
hi %= THASH_SIZE;
hi = aux.isym & ((1 << HASHBITS) - 1);
hi %= THASH_SIZE;
@@
-1949,9
+1957,9
@@
add_aux_sym_tir (type_info_t *t, /* current type information */
|| t->basic_type == bt_Union
|| t->basic_type == bt_Enum)
{
|| t->basic_type == bt_Union
|| t->basic_type == bt_Enum)
{
-
register
symint_t file_index = t->tag_ptr->ifd;
-
register
localsym_t *sym = t->tag_ptr->sym;
-
register
forward_t *forward_ref = allocate_forward ();
+ symint_t file_index = t->tag_ptr->ifd;
+ localsym_t *sym = t->tag_ptr->sym;
+ forward_t *forward_ref = allocate_forward ();
if (sym != (localsym_t *) NULL)
{
if (sym != (localsym_t *) NULL)
{
@@
-2106,8
+2114,8
@@
add_unknown_tag (tag_t *ptag /* pointer to tag information */)
static void
add_procedure (char *func /* func name */)
{
static void
add_procedure (char *func /* func name */)
{
-
register
varray_t *vp;
-
register
proc_t *new_proc_ptr;
+ varray_t *vp;
+ proc_t *new_proc_ptr;
symbolS *sym;
#ifdef ECOFF_DEBUG
symbolS *sym;
#ifdef ECOFF_DEBUG
@@
-2176,8
+2184,8
@@
ecoff_get_cur_proc_sym (void)
static void
add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
{
static void
add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
{
-
register
int first_ch;
-
register
efdr_t *fil_ptr;
+ int first_ch;
+ efdr_t *fil_ptr;
#ifdef ECOFF_DEBUG
if (debug)
#ifdef ECOFF_DEBUG
if (debug)
@@
-2188,12
+2196,9
@@
add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
want to use the actual file name. */
if (file_name == (const char *) NULL)
{
want to use the actual file name. */
if (file_name == (const char *) NULL)
{
- char *file;
-
if (first_file != (efdr_t *) NULL)
as_fatal (_("fake .file after real one"));
if (first_file != (efdr_t *) NULL)
as_fatal (_("fake .file after real one"));
- as_where (&file, (unsigned int *) NULL);
- file_name = (const char *) file;
+ file_name = as_where ((unsigned int *) NULL);
/* Automatically generate ECOFF debugging information, since I
think that's what other ECOFF assemblers do. We don't do
/* Automatically generate ECOFF debugging information, since I
think that's what other ECOFF assemblers do. We don't do
@@
-2246,7
+2251,7
@@
add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
fil_ptr = fil_ptr->next_file)
{
if (first_ch == fil_ptr->name[0]
fil_ptr = fil_ptr->next_file)
{
if (first_ch == fil_ptr->name[0]
- &&
str
cmp (file_name, fil_ptr->name) == 0
+ &&
filename_
cmp (file_name, fil_ptr->name) == 0
&& fil_ptr->fdr.fMerge)
{
cur_file_ptr = fil_ptr;
&& fil_ptr->fdr.fMerge)
{
cur_file_ptr = fil_ptr;
@@
-2312,9
+2317,9
@@
add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
compiler output, only in hand coded assembler. */
void
compiler output, only in hand coded assembler. */
void
-ecoff_new_file (const char *name)
+ecoff_new_file (const char *name
, int appfile ATTRIBUTE_UNUSED
)
{
{
- if (cur_file_ptr != NULL &&
str
cmp (cur_file_ptr->name, name) == 0)
+ if (cur_file_ptr != NULL &&
filename_
cmp (cur_file_ptr->name, name) == 0)
return;
add_file (name, 0, 0);
return;
add_file (name, 0, 0);
@@
-2426,14
+2431,13
@@
ecoff_directive_begin (int ignore ATTRIBUTE_UNUSED)
return;
}
return;
}
- name = input_line_pointer;
- name_end = get_symbol_end ();
+ name_end = get_symbol_name (&name);
(void) add_ecoff_symbol ((const char *) NULL, st_Block, sc_Text,
symbol_find_or_make (name),
(bfd_vma) 0, (symint_t) 0, (symint_t) 0);
(void) add_ecoff_symbol ((const char *) NULL, st_Block, sc_Text,
symbol_find_or_make (name),
(bfd_vma) 0, (symint_t) 0, (symint_t) 0);
-
*input_line_pointer = name_end
;
+
(void) restore_line_pointer (name_end)
;
/* The line number follows, but we don't use it. */
(void) get_absolute_expression ();
/* The line number follows, but we don't use it. */
(void) get_absolute_expression ();
@@
-2464,8
+2468,7
@@
ecoff_directive_bend (int ignore ATTRIBUTE_UNUSED)
return;
}
return;
}
- name = input_line_pointer;
- name_end = get_symbol_end ();
+ name_end = get_symbol_name (&name);
/* The value is the distance between the .bend directive and the
corresponding symbol. We fill in the offset when we write out
/* The value is the distance between the .bend directive and the
corresponding symbol. We fill in the offset when we write out
@@
-2477,7
+2480,7
@@
ecoff_directive_bend (int ignore ATTRIBUTE_UNUSED)
(void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text, endsym,
(bfd_vma) 0, (symint_t) 0, (symint_t) 0);
(void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text, endsym,
(bfd_vma) 0, (symint_t) 0, (symint_t) 0);
-
*input_line_pointer = name_end
;
+
restore_line_pointer (name_end)
;
/* The line number follows, but we don't use it. */
(void) get_absolute_expression ();
/* The line number follows, but we don't use it. */
(void) get_absolute_expression ();
@@
-2511,8
+2514,7
@@
ecoff_directive_def (int ignore ATTRIBUTE_UNUSED)
SKIP_WHITESPACE ();
SKIP_WHITESPACE ();
- name = input_line_pointer;
- name_end = get_symbol_end ();
+ name_end = get_symbol_name (&name);
if (coff_sym_name != (char *) NULL)
as_warn (_(".def pseudo-op used inside of .def/.endef; ignored"));
if (coff_sym_name != (char *) NULL)
as_warn (_(".def pseudo-op used inside of .def/.endef; ignored"));
@@
-2524,7
+2526,7
@@
ecoff_directive_def (int ignore ATTRIBUTE_UNUSED)
free (coff_sym_name);
if (coff_tag != (char *) NULL)
free (coff_tag);
free (coff_sym_name);
if (coff_tag != (char *) NULL)
free (coff_tag);
-
+
coff_sym_name = xstrdup (name);
coff_type = type_info_init;
coff_storage_class = sc_Nil;
coff_sym_name = xstrdup (name);
coff_type = type_info_init;
coff_storage_class = sc_Nil;
@@
-2536,7
+2538,7
@@
ecoff_directive_def (int ignore ATTRIBUTE_UNUSED)
coff_sym_addend = 0;
}
coff_sym_addend = 0;
}
-
*input_line_pointer = name_end
;
+
restore_line_pointer (name_end)
;
demand_empty_rest_of_line ();
}
demand_empty_rest_of_line ();
}
@@
-2749,12
+2751,11
@@
ecoff_directive_tag (int ignore ATTRIBUTE_UNUSED)
return;
}
return;
}
- name = input_line_pointer;
- name_end = get_symbol_end ();
+ name_end = get_symbol_name (&name);
coff_tag = xstrdup (name);
coff_tag = xstrdup (name);
-
*input_line_pointer = name_end
;
+
(void) restore_line_pointer (name_end)
;
demand_empty_rest_of_line ();
}
demand_empty_rest_of_line ();
}
@@
-2777,7
+2778,7
@@
ecoff_directive_val (int ignore ATTRIBUTE_UNUSED)
expression (&exp);
if (exp.X_op != O_constant && exp.X_op != O_symbol)
{
expression (&exp);
if (exp.X_op != O_constant && exp.X_op != O_symbol)
{
- as_bad (_(".val expression is too co
pm
lex"));
+ as_bad (_(".val expression is too co
mp
lex"));
demand_empty_rest_of_line ();
return;
}
demand_empty_rest_of_line ();
return;
}
@@
-2996,13
+2997,12
@@
ecoff_directive_end (int ignore ATTRIBUTE_UNUSED)
return;
}
return;
}
- name = input_line_pointer;
- name_end = get_symbol_end ();
+ name_end = get_symbol_name (&name);
if (name == input_line_pointer)
{
as_warn (_(".end directive has no name"));
if (name == input_line_pointer)
{
as_warn (_(".end directive has no name"));
-
*input_line_pointer = name_end
;
+
(void) restore_line_pointer (name_end)
;
demand_empty_rest_of_line ();
return;
}
demand_empty_rest_of_line ();
return;
}
@@
-3023,7
+3023,7
@@
ecoff_directive_end (int ignore ATTRIBUTE_UNUSED)
cur_proc_ptr = (proc_t *) NULL;
cur_proc_ptr = (proc_t *) NULL;
-
*input_line_pointer = name_end
;
+
(void) restore_line_pointer (name_end)
;
demand_empty_rest_of_line ();
}
\f
demand_empty_rest_of_line ();
}
\f
@@
-3045,20
+3045,19
@@
ecoff_directive_ent (int ignore ATTRIBUTE_UNUSED)
return;
}
return;
}
- name = input_line_pointer;
- name_end = get_symbol_end ();
+ name_end = get_symbol_name (&name);
if (name == input_line_pointer)
{
as_warn (_(".ent directive has no name"));
if (name == input_line_pointer)
{
as_warn (_(".ent directive has no name"));
-
*input_line_pointer = name_end
;
+
(void) restore_line_pointer (name_end)
;
demand_empty_rest_of_line ();
return;
}
add_procedure (name);
demand_empty_rest_of_line ();
return;
}
add_procedure (name);
-
*input_line_pointer = name_end
;
+
(void) restore_line_pointer (name_end)
;
/* The .ent directive is sometimes followed by a number. I'm not
really sure what the number means. I don't see any way to store
/* The .ent directive is sometimes followed by a number. I'm not
really sure what the number means. I don't see any way to store
@@
-3087,10
+3086,9
@@
ecoff_directive_extern (int ignore ATTRIBUTE_UNUSED)
symbolS *symbolp;
valueT size;
symbolS *symbolp;
valueT size;
- name = input_line_pointer;
- c = get_symbol_end ();
+ c = get_symbol_name (&name);
symbolp = symbol_find_or_make (name);
symbolp = symbol_find_or_make (name);
-
*input_line_pointer = c
;
+
(void) restore_line_pointer (c)
;
S_SET_EXTERNAL (symbolp);
S_SET_EXTERNAL (symbolp);
@@
-3322,7
+3320,7
@@
mark_stabs (int ignore ATTRIBUTE_UNUSED)
{
/* Add a dummy @stabs dymbol. */
stabs_seen = 1;
{
/* Add a dummy @stabs dymbol. */
stabs_seen = 1;
- (void) add_ecoff_symbol (stabs_symbol, st
Nil, sc
Info,
+ (void) add_ecoff_symbol (stabs_symbol, st
_Nil, sc_
Info,
(symbolS *) NULL,
(bfd_vma) 0, (symint_t) -1,
ECOFF_MARK_STAB (0));
(symbolS *) NULL,
(bfd_vma) 0, (symint_t) -1,
ECOFF_MARK_STAB (0));
@@
-3340,10
+3338,9
@@
ecoff_directive_weakext (int ignore ATTRIBUTE_UNUSED)
symbolS *symbolP;
expressionS exp;
symbolS *symbolP;
expressionS exp;
- name = input_line_pointer;
- c = get_symbol_end ();
+ c = get_symbol_name (&name);
symbolP = symbol_find_or_make (name);
symbolP = symbol_find_or_make (name);
-
*input_line_pointer = c
;
+
(void) restore_line_pointer (c)
;
SKIP_WHITESPACE ();
SKIP_WHITESPACE ();
@@
-3481,11
+3478,9
@@
ecoff_stab (segT sec ATTRIBUTE_UNUSED,
return;
}
return;
}
- name = input_line_pointer;
- name_end = get_symbol_end ();
-
+ name_end = get_symbol_name (&name);
sym = symbol_find_or_make (name);
sym = symbol_find_or_make (name);
-
*input_line_pointer = name_end
;
+
(void) restore_line_pointer (name_end)
;
value = 0;
addend = 0;
value = 0;
addend = 0;
@@
-3578,12
+3573,12
@@
ecoff_frob_symbol (symbolS *sym)
but with the name .scommon. */
if (scom_section.name == NULL)
{
but with the name .scommon. */
if (scom_section.name == NULL)
{
- scom_section =
bfd_com_section
;
+ scom_section =
*bfd_com_section_ptr
;
scom_section.name = ".scommon";
scom_section.output_section = &scom_section;
scom_section.symbol = &scom_symbol;
scom_section.symbol_ptr_ptr = &scom_section.symbol;
scom_section.name = ".scommon";
scom_section.output_section = &scom_section;
scom_section.symbol = &scom_symbol;
scom_section.symbol_ptr_ptr = &scom_section.symbol;
- scom_symbol = *bfd_com_section
.
symbol;
+ scom_symbol = *bfd_com_section
_ptr->
symbol;
scom_symbol.name = ".scommon";
scom_symbol.section = &scom_section;
}
scom_symbol.name = ".scommon";
scom_symbol.section = &scom_section;
}
@@
-3615,7
+3610,7
@@
ecoff_add_bytes (char **buf,
if (need < PAGE_SIZE)
need = PAGE_SIZE;
want = (*bufend - *buf) + need;
if (need < PAGE_SIZE)
need = PAGE_SIZE;
want = (*bufend - *buf) + need;
- *buf =
xrealloc (
*buf, want);
+ *buf =
XRESIZEVEC (char,
*buf, want);
*bufend = *buf + want;
return *buf + at;
}
*bufend = *buf + want;
return *buf + at;
}
@@
-3659,7
+3654,7
@@
ecoff_build_lineno (const struct ecoff_debug_swap *backend,
long *linecntptr)
{
char *bufptr;
long *linecntptr)
{
char *bufptr;
-
register
lineno_list_t *l;
+ lineno_list_t *l;
lineno_list_t *last;
efdr_t *file;
proc_t *proc;
lineno_list_t *last;
efdr_t *file;
proc_t *proc;
@@
-3889,7
+3884,7
@@
ecoff_build_symbols (const struct ecoff_debug_swap *backend,
unsigned long offset)
{
const bfd_size_type external_sym_size = backend->external_sym_size;
unsigned long offset)
{
const bfd_size_type external_sym_size = backend->external_sym_size;
- void (* const swap_sym_out) (bfd *, const SYMR *,
PTR
)
+ void (* const swap_sym_out) (bfd *, const SYMR *,
void *
)
= backend->swap_sym_out;
char *sym_out;
long isym;
= backend->swap_sym_out;
char *sym_out;
long isym;
@@
-4065,7
+4060,7
@@
ecoff_build_symbols (const struct ecoff_debug_swap *backend,
sc = sc_Bss;
else if (strcmp (segname, ".sbss") == 0)
sc = sc_SBss;
sc = sc_Bss;
else if (strcmp (segname, ".sbss") == 0)
sc = sc_SBss;
- else if (seg ==
&bfd_abs_section
)
+ else if (seg ==
bfd_abs_section_ptr
)
sc = sc_Abs;
else
{
sc = sc_Abs;
else
{
@@
-4128,7
+4123,7
@@
ecoff_build_symbols (const struct ecoff_debug_swap *backend,
sym_ptr->ecoff_sym.asym.iss =
begin_ptr->ecoff_sym.asym.iss;
sym_ptr->ecoff_sym.asym.iss =
begin_ptr->ecoff_sym.asym.iss;
- begin_type = begin_ptr->ecoff_sym.asym.st;
+ begin_type =
(st_t)
begin_ptr->ecoff_sym.asym.st;
if (begin_type == st_File
|| begin_type == st_Block)
{
if (begin_type == st_File
|| begin_type == st_Block)
{
@@
-4254,7
+4249,7
@@
ecoff_build_procs (const struct ecoff_debug_swap *backend,
unsigned long offset)
{
const bfd_size_type external_pdr_size = backend->external_pdr_size;
unsigned long offset)
{
const bfd_size_type external_pdr_size = backend->external_pdr_size;
- void (* const swap_pdr_out) (bfd *, const PDR *,
PTR
)
+ void (* const swap_pdr_out) (bfd *, const PDR *,
void *
)
= backend->swap_pdr_out;
char *pdr_out;
long iproc;
= backend->swap_pdr_out;
char *pdr_out;
long iproc;
@@
-4539,7
+4534,7
@@
ecoff_build_fdr (const struct ecoff_debug_swap *backend,
unsigned long offset)
{
const bfd_size_type external_fdr_size = backend->external_fdr_size;
unsigned long offset)
{
const bfd_size_type external_fdr_size = backend->external_fdr_size;
- void (* const swap_fdr_out) (bfd *, const FDR *,
PTR
)
+ void (* const swap_fdr_out) (bfd *, const FDR *,
void *
)
= backend->swap_fdr_out;
long ifile;
char *fdr_out;
= backend->swap_fdr_out;
long ifile;
char *fdr_out;
@@
-4584,7
+4579,7
@@
ecoff_build_fdr (const struct ecoff_debug_swap *backend,
static void
ecoff_setup_ext (void)
{
static void
ecoff_setup_ext (void)
{
-
register
symbolS *sym;
+ symbolS *sym;
for (sym = symbol_rootP; sym != (symbolS *) NULL; sym = symbol_next (sym))
{
for (sym = symbol_rootP; sym != (symbolS *) NULL; sym = symbol_next (sym))
{
@@
-4696,7
+4691,7
@@
ecoff_build_debug (HDRR *hdr,
/* Build the symbolic information. */
offset = 0;
/* Build the symbolic information. */
offset = 0;
- buf =
xmalloc (
PAGE_SIZE);
+ buf =
XNEWVEC (char,
PAGE_SIZE);
bufend = buf + PAGE_SIZE;
/* Build the line number information. */
bufend = buf + PAGE_SIZE;
/* Build the line number information. */
@@
-4780,7
+4775,7
@@
ecoff_build_debug (HDRR *hdr,
static page_type *
allocate_cluster (unsigned long npages)
{
static page_type *
allocate_cluster (unsigned long npages)
{
-
register
page_type *value = (page_type *) xmalloc (npages * PAGE_USIZE);
+ page_type *value = (page_type *) xmalloc (npages * PAGE_USIZE);
#ifdef ECOFF_DEBUG
if (debug > 3)
#ifdef ECOFF_DEBUG
if (debug > 3)
@@
-4829,7
+4824,7
@@
allocate_page (void)
static scope_t *
allocate_scope (void)
{
static scope_t *
allocate_scope (void)
{
-
register
scope_t *ptr;
+ scope_t *ptr;
static scope_t initial_scope;
#ifndef MALLOC_CHECK
static scope_t initial_scope;
#ifndef MALLOC_CHECK
@@
-4839,8
+4834,8
@@
allocate_scope (void)
alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr->free;
else
{
alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr->free;
else
{
-
register int unallocated
= alloc_counts[(int) alloc_type_scope].unallocated;
-
register page_type *cur_page
= alloc_counts[(int) alloc_type_scope].cur_page;
+
int unallocated
= alloc_counts[(int) alloc_type_scope].unallocated;
+
page_type *cur_page
= alloc_counts[(int) alloc_type_scope].cur_page;
if (unallocated == 0)
{
if (unallocated == 0)
{
@@
-4855,7
+4850,7
@@
allocate_scope (void)
#else
#else
- ptr =
(scope_t *) xmalloc (sizeof (scope_t)
);
+ ptr =
XNEW (scope_t
);
#endif
#endif
@@
-4875,7
+4870,7
@@
free_scope (scope_t *ptr)
ptr->free = alloc_counts[(int) alloc_type_scope].free_list.f_scope;
alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr;
#else
ptr->free = alloc_counts[(int) alloc_type_scope].free_list.f_scope;
alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr;
#else
- free ((
PTR
) ptr);
+ free ((
void *
) ptr);
#endif
}
\f
#endif
}
\f
@@
-4884,13
+4879,13
@@
free_scope (scope_t *ptr)
static vlinks_t *
allocate_vlinks (void)
{
static vlinks_t *
allocate_vlinks (void)
{
-
register
vlinks_t *ptr;
+ vlinks_t *ptr;
static vlinks_t initial_vlinks;
#ifndef MALLOC_CHECK
static vlinks_t initial_vlinks;
#ifndef MALLOC_CHECK
-
register
int unallocated = alloc_counts[(int) alloc_type_vlinks].unallocated;
-
register
page_type *cur_page = alloc_counts[(int) alloc_type_vlinks].cur_page;
+ int unallocated = alloc_counts[(int) alloc_type_vlinks].unallocated;
+ page_type *cur_page = alloc_counts[(int) alloc_type_vlinks].cur_page;
if (unallocated == 0)
{
if (unallocated == 0)
{
@@
-4904,7
+4899,7
@@
allocate_vlinks (void)
#else
#else
- ptr =
(vlinks_t *) xmalloc (sizeof (vlinks_t)
);
+ ptr =
XNEW (vlinks_t
);
#endif
#endif
@@
-4918,13
+4913,13
@@
allocate_vlinks (void)
static shash_t *
allocate_shash (void)
{
static shash_t *
allocate_shash (void)
{
-
register
shash_t *ptr;
+ shash_t *ptr;
static shash_t initial_shash;
#ifndef MALLOC_CHECK
static shash_t initial_shash;
#ifndef MALLOC_CHECK
-
register
int unallocated = alloc_counts[(int) alloc_type_shash].unallocated;
-
register
page_type *cur_page = alloc_counts[(int) alloc_type_shash].cur_page;
+ int unallocated = alloc_counts[(int) alloc_type_shash].unallocated;
+ page_type *cur_page = alloc_counts[(int) alloc_type_shash].cur_page;
if (unallocated == 0)
{
if (unallocated == 0)
{
@@
-4938,7
+4933,7
@@
allocate_shash (void)
#else
#else
- ptr =
(shash_t *) xmalloc (sizeof (shash_t)
);
+ ptr =
XNEW (shash_t
);
#endif
#endif
@@
-4952,13
+4947,13
@@
allocate_shash (void)
static thash_t *
allocate_thash (void)
{
static thash_t *
allocate_thash (void)
{
-
register
thash_t *ptr;
+ thash_t *ptr;
static thash_t initial_thash;
#ifndef MALLOC_CHECK
static thash_t initial_thash;
#ifndef MALLOC_CHECK
-
register
int unallocated = alloc_counts[(int) alloc_type_thash].unallocated;
-
register
page_type *cur_page = alloc_counts[(int) alloc_type_thash].cur_page;
+ int unallocated = alloc_counts[(int) alloc_type_thash].unallocated;
+ page_type *cur_page = alloc_counts[(int) alloc_type_thash].cur_page;
if (unallocated == 0)
{
if (unallocated == 0)
{
@@
-4972,7
+4967,7
@@
allocate_thash (void)
#else
#else
- ptr =
(thash_t *) xmalloc (sizeof (thash_t)
);
+ ptr =
XNEW (thash_t
);
#endif
#endif
@@
-4986,7
+4981,7
@@
allocate_thash (void)
static tag_t *
allocate_tag (void)
{
static tag_t *
allocate_tag (void)
{
-
register
tag_t *ptr;
+ tag_t *ptr;
static tag_t initial_tag;
#ifndef MALLOC_CHECK
static tag_t initial_tag;
#ifndef MALLOC_CHECK
@@
-4996,8
+4991,8
@@
allocate_tag (void)
alloc_counts[(int) alloc_type_tag].free_list.f_tag = ptr->free;
else
{
alloc_counts[(int) alloc_type_tag].free_list.f_tag = ptr->free;
else
{
-
register
int unallocated = alloc_counts[(int) alloc_type_tag].unallocated;
-
register
page_type *cur_page = alloc_counts[(int) alloc_type_tag].cur_page;
+ int unallocated = alloc_counts[(int) alloc_type_tag].unallocated;
+ page_type *cur_page = alloc_counts[(int) alloc_type_tag].cur_page;
if (unallocated == 0)
{
if (unallocated == 0)
{
@@
-5012,7
+5007,7
@@
allocate_tag (void)
#else
#else
- ptr =
(tag_t *) xmalloc (sizeof (tag_t)
);
+ ptr =
XNEW (tag_t
);
#endif
#endif
@@
-5041,13
+5036,13
@@
free_tag (tag_t *ptr)
static forward_t *
allocate_forward (void)
{
static forward_t *
allocate_forward (void)
{
-
register
forward_t *ptr;
+ forward_t *ptr;
static forward_t initial_forward;
#ifndef MALLOC_CHECK
static forward_t initial_forward;
#ifndef MALLOC_CHECK
-
register
int unallocated = alloc_counts[(int) alloc_type_forward].unallocated;
-
register
page_type *cur_page = alloc_counts[(int) alloc_type_forward].cur_page;
+ int unallocated = alloc_counts[(int) alloc_type_forward].unallocated;
+ page_type *cur_page = alloc_counts[(int) alloc_type_forward].cur_page;
if (unallocated == 0)
{
if (unallocated == 0)
{
@@
-5061,7
+5056,7
@@
allocate_forward (void)
#else
#else
- ptr =
(forward_t *) xmalloc (sizeof (forward_t)
);
+ ptr =
XNEW (forward_t
);
#endif
#endif
@@
-5075,7
+5070,7
@@
allocate_forward (void)
static thead_t *
allocate_thead (void)
{
static thead_t *
allocate_thead (void)
{
-
register
thead_t *ptr;
+ thead_t *ptr;
static thead_t initial_thead;
#ifndef MALLOC_CHECK
static thead_t initial_thead;
#ifndef MALLOC_CHECK
@@
-5085,8
+5080,8
@@
allocate_thead (void)
alloc_counts[(int) alloc_type_thead].free_list.f_thead = ptr->free;
else
{
alloc_counts[(int) alloc_type_thead].free_list.f_thead = ptr->free;
else
{
-
register
int unallocated = alloc_counts[(int) alloc_type_thead].unallocated;
-
register
page_type *cur_page = alloc_counts[(int) alloc_type_thead].cur_page;
+ int unallocated = alloc_counts[(int) alloc_type_thead].unallocated;
+ page_type *cur_page = alloc_counts[(int) alloc_type_thead].cur_page;
if (unallocated == 0)
{
if (unallocated == 0)
{
@@
-5101,7
+5096,7
@@
allocate_thead (void)
#else
#else
- ptr =
(thead_t *) xmalloc (sizeof (thead_t)
);
+ ptr =
XNEW (thead_t
);
#endif
#endif
@@
-5128,13
+5123,13
@@
free_thead (thead_t *ptr)
static lineno_list_t *
allocate_lineno_list (void)
{
static lineno_list_t *
allocate_lineno_list (void)
{
-
register
lineno_list_t *ptr;
+ lineno_list_t *ptr;
static lineno_list_t initial_lineno_list;
#ifndef MALLOC_CHECK
static lineno_list_t initial_lineno_list;
#ifndef MALLOC_CHECK
-
register
int unallocated = alloc_counts[(int) alloc_type_lineno].unallocated;
-
register
page_type *cur_page = alloc_counts[(int) alloc_type_lineno].cur_page;
+ int unallocated = alloc_counts[(int) alloc_type_lineno].unallocated;
+ page_type *cur_page = alloc_counts[(int) alloc_type_lineno].cur_page;
if (unallocated == 0)
{
if (unallocated == 0)
{
@@
-5148,7
+5143,7
@@
allocate_lineno_list (void)
#else
#else
- ptr =
(lineno_list_t *) xmalloc (sizeof (lineno_list_t)
);
+ ptr =
XNEW (lineno_list_t
);
#endif
#endif
@@
-5183,13
+5178,13
@@
void
ecoff_generate_asm_lineno (void)
{
unsigned int lineno;
ecoff_generate_asm_lineno (void)
{
unsigned int lineno;
- char *filename;
+ c
onst c
har *filename;
lineno_list_t *list;
lineno_list_t *list;
-
as_where (&filename,
&lineno);
+
filename = as_where (
&lineno);
if (current_stabs_filename == (char *) NULL
if (current_stabs_filename == (char *) NULL
- ||
str
cmp (current_stabs_filename, filename))
+ ||
filename_
cmp (current_stabs_filename, filename))
add_file (filename, 0, 1);
list = allocate_lineno_list ();
add_file (filename, 0, 1);
list = allocate_lineno_list ();
This page took
0.035689 seconds
and
4
git commands to generate.