aboutsummaryrefslogtreecommitdiff
path: root/include/bfdlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/bfdlink.h')
-rw-r--r--include/bfdlink.h92
1 files changed, 74 insertions, 18 deletions
diff --git a/include/bfdlink.h b/include/bfdlink.h
index b1411c3..4998fe3 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -3,21 +3,21 @@
Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef BFDLINK_H
#define BFDLINK_H
@@ -66,6 +66,14 @@ enum bfd_link_hash_type
bfd_link_hash_warning /* Like indirect, but warn if referenced. */
};
+enum bfd_link_common_skip_ar_aymbols
+{
+ bfd_link_common_skip_none,
+ bfd_link_common_skip_text,
+ bfd_link_common_skip_data,
+ bfd_link_common_skip_all
+};
+
/* The linking routines use a hash table which uses this structure for
its elements. */
@@ -183,6 +191,12 @@ extern void bfd_link_hash_traverse
/* Add an entry to the undefs list. */
extern void bfd_link_add_undef
PARAMS ((struct bfd_link_hash_table *, struct bfd_link_hash_entry *));
+
+struct bfd_sym_chain
+{
+ struct bfd_sym_chain *next;
+ const char *name;
+};
/* This structure holds all the information needed to communicate
between BFD and the linker when doing a link. */
@@ -191,33 +205,46 @@ struct bfd_link_info
{
/* Function callbacks. */
const struct bfd_link_callbacks *callbacks;
+
/* true if BFD should generate a relocateable object file. */
boolean relocateable;
- /* true if BFD should generate relocation information in the final executable. */
+
+ /* true if BFD should generate relocation information in the final
+ executable. */
boolean emitrelocations;
+
/* true if BFD should generate a "task linked" object file,
- similar to relocatable but also with globals converted to statics. */
+ similar to relocatable but also with globals converted to
+ statics. */
boolean task_link;
+
/* true if BFD should generate a shared object. */
boolean shared;
+
/* true if BFD should pre-bind symbols in a shared object. */
boolean symbolic;
+
/* true if BFD should export all symbols in the dynamic symbol table
of an executable, rather than only those used. */
boolean export_dynamic;
+
/* true if shared objects should be linked directly, not shared. */
boolean static_link;
+
/* true if the output file should be in a traditional format. This
is equivalent to the setting of the BFD_TRADITIONAL_FORMAT flag
on the output file, but may be checked when reading the input
files. */
boolean traditional_format;
+
/* true if we want to produced optimized output files. This might
need much more time and therefore must be explicitly selected. */
boolean optimize;
+
/* true if BFD should generate errors for undefined symbols
even if generating a shared object. */
boolean no_undefined;
+
/* true if BFD should allow undefined symbols in shared objects even
when no_undefined is set to disallow undefined symbols. The net
result will be that undefined symbols in regular objects will
@@ -231,39 +258,58 @@ struct bfd_link_info
select an appropriate memset function. Apparently it is also
normal for HPPA shared libraries to have undefined symbols. */
boolean allow_shlib_undefined;
- /* True if ok to have multiple definition. */
+
+ /* true if ok to have multiple definition. */
boolean allow_multiple_definition;
+
+ /* true if ok to have version with no definition. */
+ boolean allow_undefined_version;
+
/* Which symbols to strip. */
enum bfd_link_strip strip;
+
/* Which local symbols to discard. */
enum bfd_link_discard discard;
+
/* true if symbols should be retained in memory, false if they
should be freed and reread. */
boolean keep_memory;
+
/* The list of input BFD's involved in the link. These are chained
together via the link_next field. */
bfd *input_bfds;
+
/* If a symbol should be created for each input BFD, this is section
where those symbols should be placed. It must be a section in
the output BFD. It may be NULL, in which case no such symbols
will be created. This is to support CREATE_OBJECT_SYMBOLS in the
linker command language. */
asection *create_object_symbols_section;
+
+ /* List of global symbol names that are starting points for marking
+ sections against garbage collection. */
+ struct bfd_sym_chain *gc_sym_list;
+
/* Hash table handled by BFD. */
struct bfd_link_hash_table *hash;
+
/* Hash table of symbols to keep. This is NULL unless strip is
strip_some. */
struct bfd_hash_table *keep_hash;
+
/* true if every symbol should be reported back via the notice
callback. */
boolean notice_all;
+
/* Hash table of symbols to report back via the notice callback. If
this is NULL, and notice_all is false, then no symbols are
reported back. */
struct bfd_hash_table *notice_hash;
+
/* Hash table of symbols which are being wrapped (the --wrap linker
option). If this is NULL, no symbols are being wrapped. */
struct bfd_hash_table *wrap_hash;
+
/* If a base output file is wanted, then this points to it */
PTR base_file;
@@ -275,6 +321,7 @@ struct bfd_link_info
/* The function to call when the executable or shared object is
loaded. */
const char *init_function;
+
/* The function to call when the executable or shared object is
unloaded. */
const char *fini_function;
@@ -288,9 +335,10 @@ struct bfd_link_info
/* May be used to set DT_FLAGS_1 for ELF. */
bfd_vma flags_1;
- /* True if auto-import thunks for DATA items in pei386 DLLs
- should be generated/linked against. */
- boolean pei386_auto_import;
+ /* Non-zero if auto-import thunks for DATA items in pei386 DLLs
+ should be generated/linked against. Set to 1 if this feature
+ is explicitly requested by the user, -1 if enabled by default. */
+ int pei386_auto_import;
/* True if non-PLT relocs should be merged into one reloc section
and sorted so that relocs against the same symbol come together. */
@@ -306,6 +354,10 @@ struct bfd_link_info
/* How many spare .dynamic DT_NULL entries should be added? */
unsigned int spare_dynamic_tags;
+
+ /* Criteria for skipping symbols when detemining
+ whether to include an object from an archive. */
+ enum bfd_link_common_skip_ar_aymbols common_skip_ar_aymbols;
};
/* This structures holds a set of callback functions. These are
@@ -553,6 +605,10 @@ struct bfd_elf_version_expr
const char *pattern;
/* Matching function. */
int (*match) PARAMS((struct bfd_elf_version_expr *, const char *));
+ /* Defined by ".symver". */
+ unsigned int symver: 1;
+ /* Defined by version script. */
+ unsigned int script : 1;
};
/* Version dependencies. */