diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-04-06 06:42:38 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-04-06 06:42:38 -0400 |
commit | a9d8c4de571ce876a21a8cd2a6435c708d955049 (patch) | |
tree | fc424b2e7ac02e2cb964afbd2434149a6a3152b9 /gcc/mips-tfile.c | |
parent | 2d0933a2523e8f6ce0fc5115b550b778a549fbcc (diff) | |
download | gcc-a9d8c4de571ce876a21a8cd2a6435c708d955049.zip gcc-a9d8c4de571ce876a21a8cd2a6435c708d955049.tar.gz gcc-a9d8c4de571ce876a21a8cd2a6435c708d955049.tar.bz2 |
(update_headers): Copy stStatic symbols from the old local symbol table to the...
(update_headers): Copy stStatic symbols from the old local symbol
table to the new local symbol table if they did not get added via
debugging psuedo ops.
From-SVN: r6971
Diffstat (limited to 'gcc/mips-tfile.c')
-rw-r--r-- | gcc/mips-tfile.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c index 2d8e416..efe3354 100644 --- a/gcc/mips-tfile.c +++ b/gcc/mips-tfile.c @@ -3990,7 +3990,40 @@ update_headers __proto((void)) file_ptr != (efdr_t *)0; file_ptr = file_ptr->next_file) { + register SYMR *sym_start; + register SYMR *sym; + register SYMR *sym_end_p1; + register FDR *fd_ptr = file_ptr->orig_fdr; + cur_file_ptr = file_ptr; + + /* Copy st_Static symbols from the original local symbol table if + they did not get added to the new local symbol table. + This happens with stabs-in-ecoff or if the source file is + compiled without debugging. */ + sym_start = ORIG_LSYMS (fd_ptr->isymBase); + sym_end_p1 = sym_start + fd_ptr->csym; + for (sym = sym_start; sym < sym_end_p1; sym++) + { + if ((st_t)sym->st == st_Static) + { + register char *str = ORIG_LSTRS (fd_ptr->issBase + sym->iss); + register Size_t len = strlen (str); + register shash_t *hash_ptr; + + hash_ptr = hash_string (str, + (Ptrdiff_t)len, + &file_ptr->shash_head[0], + (symint_t *)0); + if (hash_ptr == (shash_t *)0) + { + (void) add_local_symbol (str, str + len, + (st_t)sym->st, (sc_t)sym->sc, + (symint_t)sym->value, + (symint_t)indexNil); + } + } + } (void) add_local_symbol ((const char *)0, (const char *)0, st_End, sc_Text, (symint_t)0, |