diff options
author | Richard Henderson <rth@redhat.com> | 1998-01-27 13:33:54 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 1998-01-27 13:33:54 +0000 |
commit | c3b27a64b4e948791421c78d462de240cdba9ced (patch) | |
tree | f65c9b3b30d3c8cc0bf801f169afce0bdb3957f0 /gas/config | |
parent | f3329c1a648a247c79b18675bb57ad79751c3b96 (diff) | |
download | gdb-c3b27a64b4e948791421c78d462de240cdba9ced.zip gdb-c3b27a64b4e948791421c78d462de240cdba9ced.tar.gz gdb-c3b27a64b4e948791421c78d462de240cdba9ced.tar.bz2 |
* as.c (parse_args): Add --keep-locals alias for -L.
Add --strip-local-absolute.
(show_usage): Update.
* as.h (flag_strip_local_absolute): New flag.
* symbols.c (S_IS_LOCAL): Use it.
* config/obj-aout.h (S_IS_LOCAL): Likewise.
* config/obj-bout.h (S_IS_LOCAL): Likewise.
* config/obj-coff.h (S_IS_LOCAL): Likewise.
PR 14689
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-aout.h | 22 | ||||
-rw-r--r-- | gas/config/obj-bout.h | 13 | ||||
-rw-r--r-- | gas/config/obj-coff.h | 10 |
3 files changed, 31 insertions, 14 deletions
diff --git a/gas/config/obj-aout.h b/gas/config/obj-aout.h index 537fb19..8940a74 100644 --- a/gas/config/obj-aout.h +++ b/gas/config/obj-aout.h @@ -1,5 +1,6 @@ /* obj-aout.h, a.out object file format for gas, the assembler. - Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1996 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -89,7 +90,11 @@ extern void obj_aout_frob_file PARAMS ((void)); #define S_IS_EXTERNAL(s) ((s)->sy_symbol.n_type & N_EXT) /* True if symbol has been defined, ie is in N_{TEXT,DATA,BSS,ABS} or N_EXT */ -#define S_IS_DEFINED(s) ((S_GET_TYPE(s) != N_UNDF) || (S_GET_OTHER(s) != 0) || (S_GET_DESC(s) != 0)) +#define S_IS_DEFINED(s) \ + (S_GET_TYPE (s) != N_UNDF || S_GET_DESC (s) != 0) + +#define S_IS_COMMON(s) \ + (S_GET_TYPE (s) == N_UNDF && S_GET_VALUE (s) != 0) #define S_IS_REGISTER(s) ((s)->sy_symbol.n_type == N_REGISTER) @@ -97,11 +102,14 @@ extern void obj_aout_frob_file PARAMS ((void)); #define S_IS_DEBUG(s) ((s)->sy_symbol.n_type & N_STAB) /* True if a symbol is local symbol name */ #define S_IS_LOCAL(s) \ - (S_GET_NAME (s) \ - && !S_IS_DEBUG (s) \ - && (strchr (S_GET_NAME (s), '\001') != NULL \ - || strchr (S_GET_NAME (s), '\002') != NULL \ - || (S_LOCAL_NAME(s) && !flag_keep_locals))) + ((S_GET_NAME (s) \ + && !S_IS_DEBUG (s) \ + && (strchr (S_GET_NAME (s), '\001') != NULL \ + || strchr (S_GET_NAME (s), '\002') != NULL \ + || (S_LOCAL_NAME(s) && !flag_keep_locals))) \ + || (flag_strip_local_absolute \ + && ! S_IS_EXTERNAL(s) \ + && S_GET_SEGMENT == absolute_section)) /* True if a symbol is not defined in this file */ #define S_IS_EXTERN(s) ((s)->sy_symbol.n_type & N_EXT) /* True if the symbol has been generated because of a .stabd directive */ diff --git a/gas/config/obj-bout.h b/gas/config/obj-bout.h index dddb19f..ec539a0 100644 --- a/gas/config/obj-bout.h +++ b/gas/config/obj-bout.h @@ -192,11 +192,14 @@ struct relocation_info #define S_IS_DEBUG(s) ((s)->sy_symbol.n_type & N_STAB) /* True if a symbol is local symbol name */ #define S_IS_LOCAL(s) \ - (S_GET_NAME (s) \ - && !S_IS_DEBUG (s) \ - && (strchr (S_GET_NAME (s), '\001') != NULL \ - || strchr (S_GET_NAME (s), '\002') != NULL \ - || (S_LOCAL_NAME(s) && !flag_keep_locals))) + ((S_GET_NAME (s) \ + && !S_IS_DEBUG (s) \ + && (strchr (S_GET_NAME (s), '\001') != NULL \ + || strchr (S_GET_NAME (s), '\002') != NULL \ + || (S_LOCAL_NAME(s) && !flag_keep_locals))) \ + || (flag_strip_local_absolute \ + && !S_IS_EXTERNAL(s) \ + && S_GET_SEGMENT(s) == absolute_section)) /* True if a symbol is not defined in this file */ #define S_IS_EXTERN(s) ((s)->sy_symbol.n_type & N_EXT) /* True if the symbol has been generated because of a .stabd directive */ diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h index 8ab4b09..ed41cd0 100644 --- a/gas/config/obj-coff.h +++ b/gas/config/obj-coff.h @@ -111,7 +111,10 @@ #ifdef TC_SH #include "coff/sh.h" -#define TARGET_FORMAT (shl ? "coff-shl" : "coff-sh") +#define TARGET_FORMAT \ + (shl \ + ? (sh_small ? "coff-shl-small" : "coff-shl") \ + : (sh_small ? "coff-sh-small" : "coff-sh")) #endif #ifdef TC_M88K @@ -451,7 +454,10 @@ typedef struct ((s)->sy_symbol.ost_entry.n_scnum == C_REGISTER_SECTION \ || (S_LOCAL_NAME(s) && ! flag_keep_locals && ! S_IS_DEBUG (s)) \ || strchr (S_GET_NAME (s), '\001') != NULL \ - || strchr (S_GET_NAME (s), '\002') != NULL) + || strchr (S_GET_NAME (s), '\002') != NULL \ + || (flag_strip_local_absolute \ + && !S_IS_EXTERNAL(s) \ + && (s)->sy_symbol.ost_entry.n_scnum == C_ABS_SECTION)) /* True if a symbol is not defined in this file */ #define S_IS_EXTERN(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 \ && S_GET_VALUE (s) == 0) |