#include "as.h"
#include "aout/stab_gnu.h"
+#include "aout/aout64.h"
#include "obstack.h"
#ifndef BFD_ASSEMBLER
N_DATA,
N_BSS,
N_UNDF, /* unknown */
- N_UNDF, /* absent */
- N_UNDF, /* pass1 */
N_UNDF, /* error */
- N_UNDF, /* bignum/flonum */
- N_UNDF, /* difference */
+ N_UNDF, /* expression */
N_UNDF, /* debug */
N_UNDF, /* ntv */
N_UNDF, /* ptv */
asection *sec;
int desc, type, other;
- /* Is this part format-dependent? */
- if (sym->sy_forward)
- {
- S_SET_VALUE (sym,
- S_GET_VALUE (sym)
- + S_GET_VALUE (sym->sy_forward)
- + sym->sy_forward->sy_frag->fr_address
- );
- sym->sy_forward = 0;
- }
-
flags = sym->bsym->flags;
desc = S_GET_DESC (sym);
type = S_GET_TYPE (sym);
sec = sym->bsym->section;
/* Only frob simple symbols this way right now. */
- if (! (type & ~0x1f))
+ if (! (type & ~ (N_TYPE | N_EXT)))
{
if (sec == &bfd_abs_section
|| sec == &bfd_und_section)
return;
if (flags & BSF_EXPORT)
- type |= 1;
+ type |= N_EXT;
+
+ /* Set the debugging flag for constructor symbols so that BFD
+ leaves them alone. */
+ switch (type & N_TYPE)
+ {
+ case N_SETA:
+ case N_SETT:
+ case N_SETD:
+ case N_SETB:
+ sym->bsym->flags |= BSF_DEBUGGING;
+ break;
+ }
}
else
{
symbolS **symbolPP;
int symbol_number = 0;
- /* JF deal with forward references first... */
- for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
- {
- if (symbolP->sy_forward)
- {
- S_SET_VALUE (symbolP, S_GET_VALUE (symbolP)
- + S_GET_VALUE (symbolP->sy_forward)
- + symbolP->sy_forward->sy_frag->fr_address);
-
- symbolP->sy_forward = 0;
- } /* if it has a forward reference */
- } /* walk the symbol chain */
-
tc_crawl_symbol_chain (headers);
symbolPP = &symbol_rootP; /*->last symbol chain link. */
S_SET_SEGMENT (symbolP, SEG_TEXT);
} /* if pusing data into text */
- S_SET_VALUE (symbolP, S_GET_VALUE (symbolP) + symbolP->sy_frag->fr_address);
+ resolve_symbol_value (symbolP);
/* OK, here is how we decide which symbols go out into the brave
new symtab. Symbols that do are: