aboutsummaryrefslogtreecommitdiff
path: root/gas/ecoff.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-08-24 21:48:18 +0000
committerIan Lance Taylor <ian@airs.com>1994-08-24 21:48:18 +0000
commita2a1a548c752684ea944c38ce94e388ba9d095c4 (patch)
treedc84dd772da50b68cb5db4e196a8355f6603d2dd /gas/ecoff.c
parent5a53b1c1783207222857e0c5c7f7d259d7ae5031 (diff)
downloadgdb-a2a1a548c752684ea944c38ce94e388ba9d095c4.zip
gdb-a2a1a548c752684ea944c38ce94e388ba9d095c4.tar.gz
gdb-a2a1a548c752684ea944c38ce94e388ba9d095c4.tar.bz2
gcc lint.
* as.c (main): Move a inside the #if 0 block which uses it. * ecoff.c (current_stabs_filename): Make const. * frags.h (frag_align_pattern): Declare. * gasp.c (new_file): Cast isp to long, and use %ld to print it. * config/tc-alpha.h (md_operand): Add cast to void. (alpha_do_align): Declare argument types. (tc_get_register): Declare. (alpha_frob_ecoff_data): Declare. * config/tc-alpha.c: Include <ctype.h>. (s_mask): Don't declare; does not exist. (line_comment_chars): Remove /* from descriptive comment. (tc_get_register): Remove unused local reg. (tc_gen_reloc): Don't bother to compare unsigned to zero. (s_base): Correct warning to actually print register number. (md_begin): Remove unused locals retval, lose, and i. (alpha_fix_adjustable): Move default case inside switch to avoid warning. (load_symbol_address): Remove unused locals reloc_addr, p, sym, and addend. (emit_byte_manip_r): Declare types for all arguments. (emit_extract_r, emit_insert_r, emit_mask_r): Likewise. (emit_sign_extend, emit_bis_r, s_proc): Likewise. (alpha_ip): Use sprint_value to print offsetT value. Remove unused local size. Remove unused label get_macro. (alpha_do_align): Make fill const. (md_apply_fix): Remove unused label check_zov.
Diffstat (limited to 'gas/ecoff.c')
-rw-r--r--gas/ecoff.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/gas/ecoff.c b/gas/ecoff.c
index edd22f0..64e4bcb 100644
--- a/gas/ecoff.c
+++ b/gas/ecoff.c
@@ -1402,6 +1402,7 @@ static int debug = 0; /* trace functions */
static int stabs_seen = 0; /* != 0 if stabs have been seen */
static int current_file_idx;
+static const char *current_stabs_filename;
/* Pseudo symbol to use when putting stabs into the symbol table. */
#ifndef STABS_SYMBOL
@@ -2200,6 +2201,8 @@ add_file (file_name, indx)
listing_source_file (file_name);
#endif
+ current_stabs_filename = file_name;
+
/* If we're creating stabs, then we don't actually make a new FDR.
Instead, we just create a stabs symbol. */
if (stabs_seen)
@@ -2275,7 +2278,7 @@ add_file (file_name, indx)
&cur_file_ptr->thash_head[0]);
if (generate_asm_line_stab)
{
- static char itstr[] = "int:t1=r1;-2147483648;2147483647;";
+ static char itstr[] = "void:t1=1";
mark_stabs (0);
(void) add_ecoff_symbol (file_name, st_Nil, sc_Nil,
symbol_new ("L0\001", now_seg,
@@ -4097,13 +4100,11 @@ ecoff_build_procs (backend, buf, bufend, offset)
void (* const swap_pdr_out) PARAMS ((bfd *, const PDR *, PTR))
= backend->swap_pdr_out;
char *pdr_out;
- int first_fil;
long iproc;
vlinks_t *file_link;
pdr_out = *buf + offset;
- first_fil = 1;
iproc = 0;
/* The procedures are stored by file. */
@@ -4153,10 +4154,11 @@ ecoff_build_procs (backend, buf, bufend, offset)
S_GET_SEGMENT (adr_sym)));
if (first)
{
- if (first_fil)
- first_fil = 0;
- else
- fil_ptr->fdr.adr = adr;
+ /* This code used to force the adr of the very
+ first fdr to be 0. However, the native tools
+ don't do that, and I can't remember why it
+ used to work that way, so I took it out. */
+ fil_ptr->fdr.adr = adr;
first = 0;
}
proc_ptr->pdr.adr = adr - fil_ptr->fdr.adr;
@@ -5116,11 +5118,18 @@ generate_ecoff_stab (what, string, type, other, desc)
static int line_label_cnt = 0;
void
-ecoff_generate_asm_line_stab (lineno)
+ecoff_generate_asm_line_stab (filename, lineno)
+ char *filename;
int lineno;
{
char *ll;
+ if (strcmp (current_stabs_filename, filename))
+ {
+ add_file (filename, 0);
+ generate_asm_line_stab = 1;
+ }
+
line_label_cnt++;
/* generate local label $LMnn */
ll = xmalloc(10);