Don't overwrite the n_other field, either.
This commit is contained in:
parent
f2a59297e3
commit
b9f91bf762
|
@ -228,17 +228,23 @@ symbolS *symbol_rootP;
|
|||
temp = S_GET_NAME(symbolP);
|
||||
S_SET_OFFSET(symbolP, symbolP->sy_name_offset);
|
||||
|
||||
/* Any symbol still undefined and is not a dbg symbol is made N_EXT. */
|
||||
if (!S_IS_DEBUG(symbolP) && !S_IS_DEFINED(symbolP))
|
||||
S_SET_EXTERNAL(symbolP);
|
||||
if (!S_IS_SET(symbolP)) {
|
||||
/*
|
||||
* Any symbol still undefined and is not a dbg symbol
|
||||
* is made N_EXT.
|
||||
*/
|
||||
if (!S_IS_DEBUG(symbolP) && !S_IS_DEFINED(symbolP))
|
||||
S_SET_EXTERNAL(symbolP);
|
||||
|
||||
/*
|
||||
* Put aux info in lower four bits of `n_other' field
|
||||
* Do this only now, because things like S_IS_DEFINED()
|
||||
* depend on S_GET_OTHER() for some unspecified reason.
|
||||
*/
|
||||
S_SET_OTHER(symbolP,
|
||||
(symbolP->sy_bind << 4) | (symbolP->sy_aux & 0xf) );
|
||||
/*
|
||||
* Put aux info in lower four bits of `n_other' field
|
||||
* Do this only now, because things like S_IS_DEFINED()
|
||||
* depend on S_GET_OTHER() for some unspecified reason.
|
||||
*/
|
||||
S_SET_OTHER(symbolP,
|
||||
(symbolP->sy_bind << 4) |
|
||||
(symbolP->sy_aux & 0xf) );
|
||||
}
|
||||
|
||||
if (S_GET_TYPE(symbolP) == N_SIZE) {
|
||||
expressionS *exp = (expressionS*)symbolP->sy_sizexp;
|
||||
|
@ -469,10 +475,7 @@ object_headers *headers;
|
|||
/* JF deal with forward references first... */
|
||||
for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next(symbolP)) {
|
||||
if (symbolP->sy_forward && symbolP->sy_forward != symbolP) {
|
||||
if (symbolP->sy_symbol.n_type != N_SETA &&
|
||||
symbolP->sy_symbol.n_type != N_SETT &&
|
||||
symbolP->sy_symbol.n_type != N_SETD &&
|
||||
symbolP->sy_symbol.n_type != N_SETB) {
|
||||
if (!S_IS_SET(symbolP)) {
|
||||
S_SET_SEGMENT(symbolP,
|
||||
S_GET_SEGMENT(symbolP->sy_forward));
|
||||
if (S_IS_EXTERNAL(symbolP->sy_forward)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
License along with GAS; see the file COPYING. If not, write
|
||||
to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: obj-aout.h,v 1.6 1996/04/14 11:31:54 pk Exp $
|
||||
$Id: obj-aout.h,v 1.7 1998/11/24 18:24:31 mycroft Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -85,6 +85,11 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */
|
|||
#define S_IS_EXTERN(s) ((s)->sy_symbol.n_type & N_EXT)
|
||||
/* True if the symbol has been generated because of a .stabd directive */
|
||||
#define S_IS_STABD(s) (S_GET_NAME(s) == (char *)0)
|
||||
/* True if the symbol is a linker set */
|
||||
#define S_IS_SET(s) ((s)->sy_symbol.n_type == N_SETA || \
|
||||
(s)->sy_symbol.n_type == N_SETT || \
|
||||
(s)->sy_symbol.n_type == N_SETD || \
|
||||
(s)->sy_symbol.n_type == N_SETB)
|
||||
|
||||
/* Accessors */
|
||||
/* The value of the symbol */
|
||||
|
|
Loading…
Reference in New Issue