aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in2.h
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1993-07-20 04:45:13 +0000
committerFred Fish <fnf@specifix.com>1993-07-20 04:45:13 +0000
commitc3e964b9553cddf344d466d923b0bf09654bdb4f (patch)
treed5732eec17ed46665dfdc16eac798be75f4eb528 /bfd/bfd-in2.h
parent62d4a6865eaf572ad21621f67e603afac7305172 (diff)
downloadgdb-c3e964b9553cddf344d466d923b0bf09654bdb4f.zip
gdb-c3e964b9553cddf344d466d923b0bf09654bdb4f.tar.gz
gdb-c3e964b9553cddf344d466d923b0bf09654bdb4f.tar.bz2
* configure.in (*-*-netware, i[34]86-*-netware): New configs.
* Makefile.in (BFD32_BACKENDS): Add nlm.o, nlm32.o, nlm32-gen.o. * Makefile.in (BFD64_BACKENDS): Add nlm64.o, nlm64-gen.o. * Makefile.in (CFILES): Add nlm{32,64}.c, nlm{32,64}-gen.c. * Makefile.in (nlm.o, nlm{32,64}.o, nlm{32,64}-gen.o: New targets. * bfd-in2.h (INLINE): Defines moved here. * {aoutx.h, elf.c, elfcode.h}: Move INLINE defines to bfd-in2.h. * libelf.h (CAT4): Move define to bfd-in2.h. * bfd-in2.h (CAT4): Merge CAT4 macro with other CAT macros. * bfd-in2.h (union tdata): Add nlm_obj_data. * bfd-in2.h (enum target_flavour): Add bfd_target_nlm_flavour. * targets.c (bfd_nlm{32,64}_{big,little}_vec): Add prototypes. * targets.c (target_vector): Add bfd_nlm{32,64}_{big,little}_vec. * (libnlm.h, nlm.c, nlmcode.h, nlm{32,64}-gen.c, nlm{32,64}-target.h, nlm{32,64}.c, config/i386-nlm.mt): New files for NLM support.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r--bfd/bfd-in2.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 1599d4d..4afc6df 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -53,6 +53,14 @@ here. */
#define BFD64
#endif
+#ifndef INLINE
+#if __GNUC__ >= 2
+#define INLINE __inline__
+#else
+#define INLINE
+#endif
+#endif
+
/* 64-bit type definition (if any) from bfd's sysdep.h goes here */
@@ -311,14 +319,28 @@ typedef struct _symbol_info
the standard routine suffix), or it must #define the routines that
are not so named, before calling JUMP_TABLE in the initializer. */
-/* Semi-portable string concatenation in cpp */
+/* Semi-portable string concatenation in cpp.
+ The CAT4 hack is to avoid a problem with some strict ANSI C preprocessors.
+ The problem is, "32_" is not a valid preprocessing token, and we don't
+ want extra underscores (e.g., "nlm_32_"). The XCAT2 macro will cause the
+ inner CAT macros to be evaluated first, producing still-valid pp-tokens.
+ Then the final concatenation can be done. (Sigh.) */
#ifndef CAT
+#ifdef SABER
+#define CAT(a,b) a##b
+#define CAT3(a,b,c) a##b##c
+#define CAT4(a,b,c,d) a##b##c##d
+#else
#ifdef __STDC__
#define CAT(a,b) a##b
#define CAT3(a,b,c) a##b##c
+#define XCAT2(a,b) CAT(a,b)
+#define CAT4(a,b,c,d) XCAT2(CAT(a,b),CAT(c,d))
#else
#define CAT(a,b) a/**/b
#define CAT3(a,b,c) a/**/b/**/c
+#define CAT4(a,b,c,d) a/**/b/**/c/**/d
+#endif
#endif
#endif
@@ -330,7 +352,7 @@ CAT(NAME,_slurp_armap),\
CAT(NAME,_slurp_extended_name_table),\
CAT(NAME,_truncate_arname),\
CAT(NAME,_write_armap),\
-CAT(NAME,_close_and_cleanup), \
+CAT(NAME,_close_and_cleanup),\
CAT(NAME,_set_section_contents),\
CAT(NAME,_get_section_contents),\
CAT(NAME,_new_section_hook),\
@@ -1491,6 +1513,7 @@ struct _bfd
struct srec_data_struct *srec_data;
struct tekhex_data_struct *tekhex_data;
struct elf_obj_tdata *elf_obj_data;
+ struct nlm_obj_tdata *nlm_obj_data;
struct bout_data_struct *bout_data;
struct sun_core_struct *sun_core_data;
struct trad_core_struct *trad_core_data;
@@ -1611,6 +1634,7 @@ typedef struct bfd_target
bfd_target_ecoff_flavour,
bfd_target_elf_flavour,
bfd_target_ieee_flavour,
+ bfd_target_nlm_flavour,
bfd_target_oasys_flavour,
bfd_target_tekhex_flavour,
bfd_target_srec_flavour,