summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd/bfd-in.h
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-02-22 04:18:42 +0000
committerobrien <obrien@FreeBSD.org>2002-02-22 04:18:42 +0000
commit670387a18a22cf299c750186efe8ca24cebb7e05 (patch)
tree70c0d6a941b83c97839ec1237622c20ea8beb870 /contrib/binutils/bfd/bfd-in.h
parentfc89183cdc6be5afa8deb7250fd15a20832ab528 (diff)
downloadFreeBSD-src-670387a18a22cf299c750186efe8ca24cebb7e05.zip
FreeBSD-src-670387a18a22cf299c750186efe8ca24cebb7e05.tar.gz
Import of Binutils from the FSF 2.12 branch (pre-.0 release).
These bits are taken from the FSF anoncvs repo on 21-Feburary-2002 20:15 PST.
Diffstat (limited to 'contrib/binutils/bfd/bfd-in.h')
-rw-r--r--contrib/binutils/bfd/bfd-in.h86
1 files changed, 54 insertions, 32 deletions
diff --git a/contrib/binutils/bfd/bfd-in.h b/contrib/binutils/bfd/bfd-in.h
index c6f2b41..bd8a915 100644
--- a/contrib/binutils/bfd/bfd-in.h
+++ b/contrib/binutils/bfd/bfd-in.h
@@ -1,6 +1,6 @@
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001
+ 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -71,7 +71,7 @@ extern "C" {
#endif
#endif
-/* forward declaration */
+/* Forward declaration. */
typedef struct _bfd bfd;
/* To squelch erroneous compiler warnings ("illegal pointer
@@ -88,8 +88,16 @@ typedef struct _bfd bfd;
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
/* It gets worse if the host also defines a true/false enum... -sts */
/* And even worse if your compiler has built-in boolean types... -law */
+/* And even worse if your compiler provides a stdbool.h that conflicts
+ with these definitions... gcc 2.95 and later do. If so, it must
+ be included first. -drow */
#if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
#define TRUE_FALSE_ALREADY_DEFINED
+#else
+#if defined (__bool_true_false_are_defined)
+/* We have <stdbool.h>. */
+#define TRUE_FALSE_ALREADY_DEFINED
+#endif
#endif
#ifdef MPW
/* Pre-emptive strike - get the file with the enum. */
@@ -191,15 +199,17 @@ extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
typedef unsigned int flagword; /* 32 bits of flags */
typedef unsigned char bfd_byte;
-/** File formats */
+/* File formats. */
-typedef enum bfd_format {
- bfd_unknown = 0, /* file format is unknown */
- bfd_object, /* linker/assember/compiler output */
- bfd_archive, /* object archive file */
- bfd_core, /* core dump */
- bfd_type_end} /* marks the end; don't use it! */
- bfd_format;
+typedef enum bfd_format
+{
+ bfd_unknown = 0, /* File format is unknown. */
+ bfd_object, /* Linker/assember/compiler output. */
+ bfd_archive, /* Object archive file. */
+ bfd_core, /* Core dump. */
+ bfd_type_end /* Marks the end; don't use it! */
+}
+bfd_format;
/* Values that may appear in the flags field of a BFD. These also
appear in the object_flags field of the bfd_target structure, where
@@ -258,7 +268,7 @@ typedef enum bfd_format {
memory. If this is set, iostream points to a bfd_in_memory struct. */
#define BFD_IN_MEMORY 0x800
-/* symbols and relocation */
+/* Symbols and relocation. */
/* A count of carsyms (canonical archive symbols). */
typedef unsigned long symindex;
@@ -282,33 +292,40 @@ typedef const struct reloc_howto_struct reloc_howto_type;
#define bfd_asymbol_flavour(x) (bfd_asymbol_bfd(x)->xvec->flavour)
/* A canonical archive symbol. */
-/* This is a type pun with struct ranlib on purpose! */
-typedef struct carsym {
+/* This is a type pun with struct ranlib on purpose! */
+typedef struct carsym
+{
char *name;
- file_ptr file_offset; /* look here to find the file */
-} carsym; /* to make these you call a carsymogen */
+ file_ptr file_offset; /* Look here to find the file. */
+}
+carsym; /* To make these you call a carsymogen. */
/* Used in generating armaps (archive tables of contents).
- Perhaps just a forward definition would do? */
-struct orl { /* output ranlib */
- char **name; /* symbol name */
- union {
+ Perhaps just a forward definition would do? */
+struct orl /* Output ranlib. */
+{
+ char **name; /* Symbol name. */
+ union
+ {
file_ptr pos;
bfd *abfd;
- } u; /* bfd* or file position */
- int namidx; /* index into string table */
+ } u; /* bfd* or file position. */
+ int namidx; /* Index into string table. */
};
-/* Linenumber stuff */
-typedef struct lineno_cache_entry {
- unsigned int line_number; /* Linenumber from start of function*/
- union {
- struct symbol_cache_entry *sym; /* Function name */
- bfd_vma offset; /* Offset into section */
+/* Linenumber stuff. */
+typedef struct lineno_cache_entry
+{
+ unsigned int line_number; /* Linenumber from start of function. */
+ union
+ {
+ struct symbol_cache_entry *sym; /* Function name. */
+ bfd_vma offset; /* Offset into section. */
} u;
-} alent;
+}
+alent;
-/* object and core file sections */
+/* Object and core file sections. */
#define align_power(addr, align) \
( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
@@ -447,7 +464,7 @@ extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
-/* User program access to BFD facilities */
+/* User program access to BFD facilities. */
/* Direct I/O routines, for programs which know more about the object
file than BFD does. Use higher level routines if possible. */
@@ -663,6 +680,9 @@ extern int bfd_get_sign_extend_vma PARAMS ((bfd *));
extern boolean bfd_m68k_elf32_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
+extern boolean bfd_mips_elf32_create_embedded_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
+ char **));
/* SunOS shared library support routines for the linker. */
@@ -688,7 +708,8 @@ extern boolean bfd_sparclinux_size_dynamic_sections
struct _bfd_window_internal;
typedef struct _bfd_window_internal bfd_window_internal;
-typedef struct _bfd_window {
+typedef struct _bfd_window
+{
/* What the user asked for. */
PTR data;
bfd_size_type size;
@@ -699,7 +720,8 @@ typedef struct _bfd_window {
application; don't want to give the same region back when the
application wants two writable copies! */
struct _bfd_window_internal *i;
-} bfd_window;
+}
+bfd_window;
extern void bfd_init_window PARAMS ((bfd_window *));
extern void bfd_free_window PARAMS ((bfd_window *));
OpenPOWER on IntegriCloud