diff options
Diffstat (limited to 'gnu/usr.bin/gas/config/obj-coff.h')
-rw-r--r-- | gnu/usr.bin/gas/config/obj-coff.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gnu/usr.bin/gas/config/obj-coff.h b/gnu/usr.bin/gas/config/obj-coff.h index 6bc8d76056d..682b8102a1f 100644 --- a/gnu/usr.bin/gas/config/obj-coff.h +++ b/gnu/usr.bin/gas/config/obj-coff.h @@ -1,4 +1,4 @@ -/* $OpenBSD: obj-coff.h,v 1.2 1998/02/15 18:49:27 niklas Exp $ */ +/* $OpenBSD: obj-coff.h,v 1.3 1998/02/28 00:52:10 niklas Exp $ */ /* coff object file format Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. @@ -191,7 +191,7 @@ typedef struct { section == 0 and value > 0 (external bss symbol) */ #define S_IS_DEFINED(s) ((s)->sy_symbol.ost_entry.n_scnum > C_UNDEF_SECTION || \ ((s)->sy_symbol.ost_entry.n_scnum == C_UNDEF_SECTION && \ - (s)->sy_symbol.ost_entry.n_value > 0)) + S_GET_VALUE(s) > 0)) /* True if a debug special symbol entry */ #define S_IS_DEBUG(s) ((s)->sy_symbol.ost_entry.n_scnum == C_DEBUG_SECTION) /* True if a symbol is local symbol name */ @@ -200,12 +200,14 @@ typedef struct { (s)->sy_symbol.ost_entry.n_scnum == C_REGISTER_SECTION || \ (S_LOCAL_NAME(s) && !flagseen['L'])) /* True if a symbol is not defined in this file */ -#define S_IS_EXTERN(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 && (s)->sy_symbol.ost_entry.n_value == 0) +#define S_IS_EXTERN(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 \ + && S_GET_VALUE (s) == 0) /* * True if a symbol can be multiply defined (bss symbols have this def * though it is bad practice) */ -#define S_IS_COMMON(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 && (s)->sy_symbol.ost_entry.n_value != 0) +#define S_IS_COMMON(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 + && S_GET_VALUE (s) != 0) /* True if a symbol name is in the string table, i.e. its length is > 8. */ #define S_IS_STRING(s) (strlen(S_GET_NAME(s)) > 8 ? 1 : 0) @@ -216,8 +218,6 @@ typedef struct { #define S_GET_OFFSET(s) ((s)->sy_symbol.ost_entry.n_offset) /* The zeroes if symbol name is longer than 8 chars */ #define S_GET_ZEROES(s) ((s)->sy_symbol.ost_entry.n_zeroes) -/* The value of the symbol */ -#define S_GET_VALUE(s) ((unsigned) ((s)->sy_symbol.ost_entry.n_value)) /* The numeric value of the segment */ #define S_GET_SEGMENT(s) (N_TYPE_seg[(s)->sy_symbol.ost_entry.n_scnum+4]) /* The data type */ @@ -234,8 +234,6 @@ typedef struct { #define S_SET_OFFSET(s,v) ((s)->sy_symbol.ost_entry.n_offset = (v)) /* The zeroes if symbol name is longer than 8 chars */ #define S_SET_ZEROES(s,v) ((s)->sy_symbol.ost_entry.n_zeroes = (v)) -/* Set the value of the symbol */ -#define S_SET_VALUE(s,v) ((s)->sy_symbol.ost_entry.n_value = (v)) /* The numeric value of the segment */ #define S_SET_SEGMENT(s,v) ((s)->sy_symbol.ost_entry.n_scnum = SEGMENT_TO_SYMBOL_TYPE(v)) /* The data type */ |