return SEG_INFO_FROM_SECTION_NUMBER (x->sy_symbol.ost_entry.n_scnum).seg_t;
}
-
-
/* calculate the size of the frag chain and fill in the section header
to contain all of it, also fill in the addr of the sections */
static unsigned int
symbolS **tail;
{
unsigned int symbol_number = 0;
- symbolS *symbolP;
- for (symbolP = *head; *head != NULL;)
+ while (*head != NULL)
{
symbolS *tmp = *head;
tie_tags ()
{
unsigned int symbol_number = 0;
-
symbolS *symbolP;
- for (symbolP = symbol_rootP; symbolP; symbolP =
- symbol_next (symbolP))
+
+ for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
{
symbolP->sy_number = symbol_number;
-
-
if (SF_GET_TAGGED (symbolP))
{
SA_SET_SYM_TAGNDX
symbol_number += 1 + S_GET_NUMBER_AUXILIARY (symbolP);
}
- return symbol_number;
+ return symbol_number;
}
static void
* undefined symbols at the end of the list.
*/
+ /* Is there a .file symbol ? If not insert one at the beginning. */
if (symbol_rootP == NULL
|| S_GET_STORAGE_CLASS (symbol_rootP) != C_FILE)
{
c_dot_file_symbol ("fake");
}
- /* Is there a .file symbol ? If not insert one at the beginning. */
/*
* Build up static symbols for the sections, they are filled in later
/* Make sure that the symbol is first on the symbol chain */
if (symbol_rootP != symbolP)
{
- if (symbolP == symbol_lastP)
- {
- symbol_lastP = symbol_lastP->sy_previous;
- } /* if it was the last thing on the list */
-
symbol_remove (symbolP, &symbol_rootP, &symbol_lastP);
symbol_insert (symbolP, symbol_rootP, &symbol_rootP, &symbol_lastP);
- symbol_rootP = symbolP;
- } /* if not first on the list */
-
+ }
} /* c_dot_file_symbol() */
/*
continue;
} /* COBR */
#endif /* TC_I960 */
-#if (defined (TC_I386) || defined (TE_LYNX) || defined (TE_AUX)) && !defined(TE_PE)
+#if ((defined (TC_I386) || defined (TE_LYNX) || defined (TE_AUX)) && !defined(TE_PE)) || defined (COFF_COMMON_ADDEND)
/* 386 COFF uses a peculiar format in which the
value of a common symbol is stored in the .text
segment (I've checked this on SVR3.2 and SCO
3.2.2) Ian Taylor <ian@cygnus.com>. */
+ /* This is also true for 68k COFF on sysv machines
+ (Checked on Motorola sysv68 R3V6 and R3V7.1, and also on
+ UNIX System V/M68000, Release 1.0 from ATT/Bell Labs)
+ Philippe De Muyter <phdm@info.ucl.ac.be>. */
if (S_IS_COMMON (add_symbolP))
add_number += S_GET_VALUE (add_symbolP);
#endif