diff options
author | obrien <obrien@FreeBSD.org> | 2002-10-11 06:01:20 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-10-11 06:01:20 +0000 |
commit | aae950e69caf1dc3f308b74fe6d066a645a7ed09 (patch) | |
tree | fc657a1fb5e0ceeb952b5e5ad8744fec0332849c /contrib/binutils/include/bfdlink.h | |
parent | dcf134d53b2ddea66d0fe9fba4e8950a7c07b312 (diff) | |
download | FreeBSD-src-aae950e69caf1dc3f308b74fe6d066a645a7ed09.zip FreeBSD-src-aae950e69caf1dc3f308b74fe6d066a645a7ed09.tar.gz |
Import of Binutils from the FSF 2.13 branch (just pre-.1 release).
These bits are taken from the FSF anoncvs repo on 11-Oct-2002 22:39:35 PDT.
Diffstat (limited to 'contrib/binutils/include/bfdlink.h')
-rw-r--r-- | contrib/binutils/include/bfdlink.h | 96 |
1 files changed, 70 insertions, 26 deletions
diff --git a/contrib/binutils/include/bfdlink.h b/contrib/binutils/include/bfdlink.h index c02a1e8..d83ff94 100644 --- a/contrib/binutils/include/bfdlink.h +++ b/contrib/binutils/include/bfdlink.h @@ -1,23 +1,23 @@ /* bfdlink.h -- header file for BFD link routines - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002 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 @@ -183,6 +183,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 +197,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,37 +250,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. */ + 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; @@ -273,6 +313,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; @@ -286,9 +327,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. */ @@ -446,7 +488,6 @@ enum bfd_link_order_type { bfd_undefined_link_order, /* Undefined. */ bfd_indirect_link_order, /* Built from a section. */ - bfd_fill_link_order, /* Fill with a 16 bit constant. */ bfd_data_link_order, /* Set to explicit data. */ bfd_section_reloc_link_order, /* Relocate against a section. */ bfd_symbol_reloc_link_order /* Relocate against a symbol. */ @@ -480,13 +521,12 @@ struct bfd_link_order } indirect; struct { - /* Value to fill with. */ - unsigned int value; - } fill; - struct - { - /* Data to put into file. The size field gives the number - of bytes which this field points to. */ + /* Size of contents, or zero when contents size == size + within output section. + A non-zero value allows filling of the output section + with an arbitrary repeated pattern. */ + unsigned int size; + /* Data to put into file. */ bfd_byte *contents; } data; struct @@ -553,6 +593,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. */ |