Rizin
unix-like reverse engineering framework and cli tools
elf-bfd.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
4 /* BFD back-end data structures for ELF files.
5  Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
6  2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
7  Written by Cygnus Support.
8 
9  This file is part of BFD, the Binary File Descriptor library.
10 
11  This program is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 3 of the License, or
14  (at your option) any later version.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software
23  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
24  MA 02110-1301, USA. */
25 
26 #ifndef _LIBELF_H_
27 #define _LIBELF_H_ 1
28 
29 #include "elf/common.h"
30 #include "elf/internal.h"
31 #include "elf/external.h"
32 #include "bfdlink.h"
33 
34 /* The number of entries in a section is its size divided by the size
35  of a single entry. This is normally only applicable to reloc and
36  symbol table sections. */
37 #define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_size / (shdr)->sh_entsize)
38 
39 /* If size isn't specified as 64 or 32, NAME macro should fail. */
40 #ifndef NAME
41 #if ARCH_SIZE == 64
42 #define NAME(x, y) x##64##_##y
43 #endif
44 #if ARCH_SIZE == 32
45 #define NAME(x, y) x##32##_##y
46 #endif
47 #endif
48 
49 #ifndef NAME
50 #define NAME(x, y) x##NOSIZE##_##y
51 #endif
52 
53 #define ElfNAME(X) NAME(Elf, X)
54 #define elfNAME(X) NAME(elf, X)
55 
56 /* Information held for an ELF symbol. The first field is the
57  corresponding asymbol. Every symbol is an ELF file is actually a
58  pointer to this structure, although it is often handled as a
59  pointer to an asymbol. */
60 
61 typedef struct
62 {
63  /* The BFD symbol. */
65  /* ELF symbol information. */
67  /* Backend specific information. */
68  union {
69  unsigned int hppa_arg_reloc;
70  void *mips_extr;
71  void *any;
72  } tc_data;
73 
74  /* Version information. This is from an Elf_Internal_Versym
75  structure in a SHT_GNU_versym section. It is zero if there is no
76  version information. */
77  unsigned short version;
78 
80 
81 struct elf_strtab_hash;
82 struct got_entry;
83 struct plt_entry;
84 
85 /* ELF linker hash table entries. */
86 
89 
90  /* Symbol index in output file. This is initialized to -1. It is
91  set to -2 if the symbol is used by a reloc. */
92  long indx;
93 
94  /* Symbol index as a dynamic symbol. Initialized to -1, and remains
95  -1 if this is not a dynamic symbol. */
96  /* ??? Note that this is consistently used as a synonym for tests
97  against whether we can perform various simplifying transformations
98  to the code. (E.g. changing a pc-relative jump to a PLT entry
99  into a pc-relative jump to the target function.) That test, which
100  is often relatively complex, and someplaces wrong or incomplete,
101  should really be replaced by a predicate in elflink.c.
102 
103  End result: this field -1 does not indicate that the symbol is
104  not in the dynamic symbol table, but rather that the symbol is
105  not visible outside this DSO. */
106  long dynindx;
107 
108  /* If this symbol requires an entry in the global offset table, the
109  processor specific backend uses this field to track usage and
110  final offset. Two schemes are supported: The first assumes that
111  a symbol may only have one GOT entry, and uses REFCOUNT until
112  size_dynamic_sections, at which point the contents of the .got is
113  fixed. Afterward, if OFFSET is -1, then the symbol does not
114  require a global offset table entry. The second scheme allows
115  multiple GOT entries per symbol, managed via a linked list
116  pointed to by GLIST. */
117  union gotplt_union {
120  struct got_entry *glist;
121  struct plt_entry *plist;
122  } got;
123 
124  /* Same, but tracks a procedure linkage table entry. */
125  union gotplt_union plt;
126 
127  /* Symbol size. */
129 
130  /* Symbol type (STT_NOTYPE, STT_OBJECT, etc.). */
131  unsigned int type : 8;
132 
133  /* Symbol st_other value, symbol visibility. */
134  unsigned int other : 8;
135 
136  /* Symbol is referenced by a non-shared object. */
137  unsigned int ref_regular : 1;
138  /* Symbol is defined by a non-shared object. */
139  unsigned int def_regular : 1;
140  /* Symbol is referenced by a shared object. */
141  unsigned int ref_dynamic : 1;
142  /* Symbol is defined by a shared object. */
143  unsigned int def_dynamic : 1;
144  /* Symbol has a non-weak reference from a non-shared object. */
145  unsigned int ref_regular_nonweak : 1;
146  /* Dynamic symbol has been adjustd. */
147  unsigned int dynamic_adjusted : 1;
148  /* Symbol needs a copy reloc. */
149  unsigned int needs_copy : 1;
150  /* Symbol needs a procedure linkage table entry. */
151  unsigned int needs_plt : 1;
152  /* Symbol appears in a non-ELF input file. */
153  unsigned int non_elf : 1;
154  /* Symbol should be marked as hidden in the version information. */
155  unsigned int hidden : 1;
156  /* Symbol was forced to local scope due to a version script file. */
157  unsigned int forced_local : 1;
158  /* Symbol was forced to be dynamic due to a version script file. */
159  unsigned int dynamic : 1;
160  /* Symbol was marked during garbage collection. */
161  unsigned int mark : 1;
162  /* Symbol is referenced by a non-GOT/non-PLT relocation. This is
163  not currently set by all the backends. */
164  unsigned int non_got_ref : 1;
165  /* Symbol has a definition in a shared object.
166  FIXME: There is no real need for this field if def_dynamic is never
167  cleared and all places that test def_dynamic also test def_regular. */
168  unsigned int dynamic_def : 1;
169  /* Symbol is weak in all shared objects. */
170  unsigned int dynamic_weak : 1;
171  /* Symbol is referenced with a relocation where C/C++ pointer equality
172  matters. */
173  unsigned int pointer_equality_needed : 1;
174 
175  /* String table index in .dynstr if this is a dynamic symbol. */
176  unsigned long dynstr_index;
177 
178  union {
179  /* If this is a weak defined symbol from a dynamic object, this
180  field points to a defined symbol with the same value, if there is
181  one. Otherwise it is NULL. */
183 
184  /* Hash value of the name computed using the ELF hash function.
185  Used part way through size_dynamic_sections, after we've finished
186  with weakdefs. */
187  unsigned long elf_hash_value;
188  } u;
189 
190  /* Version information. */
191  union {
192  /* This field is used for a symbol which is not defined in a
193  regular object. It points to the version information read in
194  from the dynamic object. */
196  /* This field is used for a symbol which is defined in a regular
197  object. It is set up in size_dynamic_sections. It points to
198  the version information we should write out for this symbol. */
201 
202  struct
203  {
204  /* Virtual table entry use information. This array is nominally of size
205  size/sizeof(target_void_pointer), though we have to be able to assume
206  and track a size while the symbol is still undefined. It is indexed
207  via offset/sizeof(target_void_pointer). */
208  size_t size;
210 
211  /* Virtual table derivation info. */
213  } * vtable;
214 };
215 
216 /* Will references to this symbol always reference the symbol
217  in this object? STV_PROTECTED is excluded from the visibility test
218  here so that function pointer comparisons work properly. Since
219  function symbols not defined in an app are set to their .plt entry,
220  it's necessary for shared libs to also reference the .plt even
221  though the symbol is really local to the shared lib. */
222 #define SYMBOL_REFERENCES_LOCAL(INFO, H) \
223  _bfd_elf_symbol_refs_local_p(H, INFO, 0)
224 
225 /* Will _calls_ to this symbol always call the version in this object? */
226 #define SYMBOL_CALLS_LOCAL(INFO, H) \
227  _bfd_elf_symbol_refs_local_p(H, INFO, 1)
228 
229 /* Common symbols that are turned into definitions don't have the
230  DEF_REGULAR flag set, so they might appear to be undefined. */
231 #define ELF_COMMON_DEF_P(H) \
232  (!(H)->def_regular && !(H)->def_dynamic && (H)->root.type == bfd_link_hash_defined)
233 
234 /* Records local symbols to be emitted in the dynamic symbol table. */
235 
238 
239  /* The input bfd this symbol came from. */
241 
242  /* The index of the local symbol being copied. */
244 
245  /* The index in the outgoing dynamic symbol table. */
246  long dynindx;
247 
248  /* A copy of the input symbol. */
250 };
251 
255 };
256 
257 /* Structures used by the eh_frame optimization code. */
258 struct eh_cie_fde {
259  /* For FDEs, this points to the CIE used. */
261  unsigned int size;
262  unsigned int offset;
263  unsigned int new_offset;
264  unsigned char fde_encoding;
265  unsigned char lsda_encoding;
266  unsigned char lsda_offset;
267  unsigned int cie : 1;
268  unsigned int removed : 1;
269  unsigned int add_augmentation_size : 1;
270  unsigned int add_fde_encoding : 1;
271  unsigned int make_relative : 1;
272  unsigned int make_lsda_relative : 1;
273  unsigned int need_lsda_relative : 1;
274  unsigned int per_encoding_relative : 1;
275  unsigned int *set_loc;
276 };
277 
279  unsigned int count;
280  struct eh_cie_fde entry[1];
281 };
282 
286 };
287 
288 struct htab;
289 
291  struct htab *cies;
293  unsigned int fde_count, array_count;
295  /* TRUE if .eh_frame_hdr should contain the sorted search table.
296  We build it if we successfully read all .eh_frame input sections
297  and recognize them. */
300 };
301 
302 /* ELF linker hash table. */
303 
305  struct bfd_link_hash_table root;
306 
307  /* Whether we have created the special dynamic sections required
308  when linking against or generating a shared object. */
310 
311  /* True if this target has relocatable executables, so needs dynamic
312  section symbols. */
314 
315  /* The BFD used to hold special sections created by the linker.
316  This will be the first BFD found which requires these sections to
317  be created. */
319 
320  /* The value to use when initialising got.refcount/offset and
321  plt.refcount/offset in an elf_link_hash_entry. Set to zero when
322  the values are refcounts. Set to init_got_offset/init_plt_offset
323  in size_dynamic_sections when the values may be offsets. */
324  union gotplt_union init_got_refcount;
325  union gotplt_union init_plt_refcount;
326 
327  /* The value to use for got.refcount/offset and plt.refcount/offset
328  when the values may be offsets. Normally (bfd_vma) -1. */
329  union gotplt_union init_got_offset;
330  union gotplt_union init_plt_offset;
331 
332  /* The number of symbols found in the link which must be put into
333  the .dynsym section. */
335 
336  /* The string table of dynamic symbols, which becomes the .dynstr
337  section. */
338  struct elf_strtab_hash *dynstr;
339 
340  /* The number of buckets in the hash table in the .hash section.
341  This is based on the number of dynamic symbols. */
343 
344  /* A linked list of DT_NEEDED names found in dynamic objects
345  included in the link. */
347 
348  /* Sections in the output bfd that provides a section symbol
349  to be used by relocations emitted against local symbols.
350  Most targets will not use data_index_section. */
353 
354  /* The _GLOBAL_OFFSET_TABLE_ symbol. */
356 
357  /* The _PROCEDURE_LINKAGE_TABLE_ symbol. */
359 
360  /* A pointer to information used to merge SEC_MERGE sections. */
361  void *merge_info;
362 
363  /* Used to link stabs in sections. */
364  struct stab_info stab_info;
365 
366  /* Used by eh_frame code when editing .eh_frame. */
367  struct eh_frame_hdr_info eh_info;
368 
369  /* A linked list of local symbols to be added to .dynsym. */
371 
372  /* A linked list of DT_RPATH/DT_RUNPATH names found in dynamic
373  objects included in the link. */
375 
376  /* Cached first output tls section and size of PT_TLS segment. */
379 
380  /* A linked list of BFD's loaded in the link. */
382 };
383 
384 /* Look up an entry in an ELF linker hash table. */
385 
386 #define elf_link_hash_lookup(table, string, create, copy, follow) \
387  ((struct elf_link_hash_entry *) \
388  bfd_link_hash_lookup(&(table)->root, (string), (create), \
389  (copy), (follow)))
390 
391 /* Traverse an ELF linker hash table. */
392 
393 #define elf_link_hash_traverse(table, func, info) \
394  (bfd_link_hash_traverse(&(table)->root, \
395  (bfd_boolean(*)(struct bfd_link_hash_entry *, void *))(func), \
396  (info)))
397 
398 /* Get the ELF linker hash table from a link_info structure. */
399 
400 #define elf_hash_table(p) ((struct elf_link_hash_table *)((p)->hash))
401 
402 /* Returns TRUE if the hash table is a struct elf_link_hash_table. */
403 #define is_elf_hash_table(htab) \
404  (((struct bfd_link_hash_table *)(htab))->type == bfd_link_elf_hash_table)
405 
406 /* Used by bfd_section_from_r_symndx to cache a small number of local
407  symbol to section mappings. */
408 #define LOCAL_SYM_CACHE_SIZE 32
411  unsigned long indx[LOCAL_SYM_CACHE_SIZE];
413 };
414 
415 /* Constant information held for an ELF backend. */
416 
420 
421  /* The size of entries in the .hash section. */
422  unsigned char sizeof_hash_entry;
423 
424  /* The number of internal relocations to allocate per external
425  relocation entry. */
426  unsigned char int_rels_per_ext_rel;
427  /* We use some fixed size arrays. This should be large enough to
428  handle all back-ends. */
429 #define MAX_INT_RELS_PER_EXT_REL 3
430 
431  unsigned char arch_size, log_file_align;
432  unsigned char elfclass, ev_current;
433  int (*write_out_phdrs)(bfd *, const Elf_Internal_Phdr *, unsigned int);
435  bfd_boolean (*checksum_contents)(bfd *, void (*)(const void *, size_t, void *), void *);
436  void (*write_relocs)(bfd *, asection *, void *);
437  bfd_boolean (*swap_symbol_in)(bfd *, const void *, const void *, Elf_Internal_Sym *);
438  void (*swap_symbol_out)(bfd *, const Elf_Internal_Sym *, void *, void *);
441  void (*swap_dyn_in)(bfd *, const void *, Elf_Internal_Dyn *);
442  void (*swap_dyn_out)(bfd *, const Elf_Internal_Dyn *, void *);
443 
444  /* This function is called to swap in a REL relocation. If an
445  external relocation corresponds to more than one internal
446  relocation, then all relocations are swapped in at once. */
447  void (*swap_reloc_in)(bfd *, const bfd_byte *, Elf_Internal_Rela *);
448 
449  /* This function is called to swap out a REL relocation. */
451 
452  /* This function is called to swap in a RELA relocation. If an
453  external relocation corresponds to more than one internal
454  relocation, then all relocations are swapped in at once. */
456 
457  /* This function is called to swap out a RELA relocation. */
459 };
460 
461 #define elf_symbol_from(ABFD, S) \
462  (((S)->the_bfd->xvec->flavour == bfd_target_elf_flavour && (S)->the_bfd->tdata.elf_obj_data != 0) \
463  ? (elf_symbol_type *)(S) \
464  : 0)
465 
471 };
472 
477  size_t locsymcount;
478  size_t extsymoff;
482 };
483 
484 /* The level of IRIX compatibility we're striving for. */
485 
486 typedef enum {
489  ict_irix6
491 
492 /* Mapping of ELF section names and types. */
494  const char *prefix;
496  /* 0 means name must match PREFIX exactly.
497  -1 means name must start with PREFIX followed by an arbitrary string.
498  -2 means name must match PREFIX exactly or consist of PREFIX followed
499  by a dot then anything.
500  > 0 means name must start with the first PREFIX_LENGTH chars of
501  PREFIX and finish with the last SUFFIX_LENGTH chars of PREFIX. */
503  int type;
504  int attr;
505 };
506 
508  COMPLAIN = 1,
509  PRETEND = 2
510 };
511 
512 typedef asection *(*elf_gc_mark_hook_fn)(asection *, struct bfd_link_info *, Elf_Internal_Rela *,
514 
516  /* The architecture for this backend. */
517  enum bfd_architecture arch;
518 
519  /* The ELF machine code (EM_xxxx) for this backend. */
521 
522  /* EI_OSABI. */
524 
525  /* The maximum page size for this backend. */
527 
528  /* The minimum page size for this backend. An input object will not be
529  considered page aligned unless its sections are correctly aligned for
530  pages at least this large. May be smaller than maxpagesize. */
532 
533  /* The common page size for this backend. */
535 
536  /* The BFD flags applied to sections created for dynamic linking. */
538 
539  /* A function to translate an ELF RELA relocation to a BFD arelent
540  structure. */
542 
543  /* A function to translate an ELF REL relocation to a BFD arelent
544  structure. */
546 
547  /* A function to determine whether a symbol is global when
548  partitioning the symbol table into local and global symbols.
549  This should be NULL for most targets, in which case the correct
550  thing will be done. MIPS ELF, at least on the Irix 5, has
551  special requirements. */
553 
554  /* The remaining functions are hooks which are called only if they
555  are not NULL. */
556 
557  /* A function to permit a backend specific check on whether a
558  particular BFD format is relevant for an object file, and to
559  permit the backend to set any global information it wishes. When
560  this is called elf_elfheader is set, but anything else should be
561  used with caution. If this returns FALSE, the check_format
562  routine will return a bfd_error_wrong_format error. */
564 
565  /* A function to do additional symbol processing when reading the
566  ELF symbol table. This is where any processor-specific special
567  section indices are handled. */
569 
570  /* A function to do additional symbol processing after reading the
571  entire ELF symbol table. */
573 
574  /* A function to set the type of the info field. Processor-specific
575  types should be handled here. */
577 
578  /* A function to return the linker hash table entry of a symbol that
579  might be satisfied by an archive symbol. */
580  struct elf_link_hash_entry *(*elf_backend_archive_symbol_lookup)(bfd *, struct bfd_link_info *, const char *);
581 
582  /* Return true if local section symbols should have a non-null st_name.
583  NULL implies false. */
585 
586  /* A function to do additional processing on the ELF section header
587  just before writing it out. This is used to set the flags and
588  type fields for some sections, or to actually write out data for
589  unusual sections. */
591 
592  /* A function to handle unusual section types when creating BFD
593  sections from ELF sections. */
595 
596  /* A function to convert machine dependent ELF section header flags to
597  BFD internal section header flags. */
599 
600  /* A function that returns a struct containing ELF section flags and
601  type for the given BFD section. */
602  const struct bfd_elf_special_section *(*get_sec_type_attr)(bfd *, asection *);
603 
604  /* A function to handle unusual program segment types when creating BFD
605  sections from ELF program segments. */
607 
608  /* A function to set up the ELF section header for a BFD section in
609  preparation for writing it out. This is where the flags and type
610  fields are set for unusual sections. */
612 
613  /* A function to get the ELF section index for a BFD section. If
614  this returns TRUE, the section was found. If it is a normal ELF
615  section, *RETVAL should be left unchanged. If it is not a normal
616  ELF section *RETVAL should be set to the SHN_xxxx index. */
618 
619  /* If this field is not NULL, it is called by the add_symbols phase
620  of a link just before adding a symbol to the global linker hash
621  table. It may modify any of the fields as it wishes. If *NAME
622  is set to NULL, the symbol will be skipped rather than being
623  added to the hash table. This function is responsible for
624  handling all processor dependent symbol bindings and section
625  indices, and must set at least *FLAGS and *SEC for each processor
626  dependent case; failure to do so will cause a link error. */
628  const char **name, flagword *flags, asection **sec, bfd_vma *value);
629 
630  /* If this field is not NULL, it is called by the elf_link_output_sym
631  phase of a link for each symbol which will appear in the object file. */
633  asection *, struct elf_link_hash_entry *);
634 
635  /* The CREATE_DYNAMIC_SECTIONS function is called by the ELF backend
636  linker the first time it encounters a dynamic object in the link.
637  This function must create any sections required for dynamic
638  linking. The ABFD argument is a dynamic object. The .interp,
639  .dynamic, .dynsym, .dynstr, and .hash functions have already been
640  created, and this function may modify the section flags if
641  desired. This function will normally create the .got and .plt
642  sections, but different backends have different requirements. */
644 
645  /* When creating a shared library, determine whether to omit the
646  dynamic symbol for the section. */
648 
649  /* The CHECK_RELOCS function is called by the add_symbols phase of
650  the ELF backend linker. It is called once for each section with
651  relocs of an object file, just after the symbols for the object
652  file have been added to the global linker hash table. The
653  function must look through the relocs and do any special handling
654  required. This generally means allocating space in the global
655  offset table, and perhaps allocating space for a reloc. The
656  relocs are always passed as Rela structures; if the section
657  actually uses Rel structures, the rz_addend field will always be
658  zero. */
660  const Elf_Internal_Rela *relocs);
661 
662  /* The CHECK_DIRECTIVES function is called once per input file by
663  the add_symbols phase of the ELF backend linker. The function
664  must inspect the bfd and create any additional symbols according
665  to any custom directives in the bfd. */
667 
668  /* The AS_NEEDED_CLEANUP function is called once per --as-needed
669  input file that was not needed by the add_symbols phase of the
670  ELF backend linker. The function must undo any target specific
671  changes in the symbol hash table. */
673 
674  /* The ADJUST_DYNAMIC_SYMBOL function is called by the ELF backend
675  linker for every symbol which is defined by a dynamic object and
676  referenced by a regular object. This is called after all the
677  input files have been seen, but before the SIZE_DYNAMIC_SECTIONS
678  function has been called. The hash table entry should be
679  bfd_link_hash_defined ore bfd_link_hash_defweak, and it should be
680  defined in a section from a dynamic object. Dynamic object
681  sections are not included in the final link, and this function is
682  responsible for changing the value to something which the rest of
683  the link can deal with. This will normally involve adding an
684  entry to the .plt or .got or some such section, and setting the
685  symbol to point to that. */
687 
688  /* The ALWAYS_SIZE_SECTIONS function is called by the backend linker
689  after all the linker input files have been seen but before the
690  section sizes have been set. This is called after
691  ADJUST_DYNAMIC_SYMBOL, but before SIZE_DYNAMIC_SECTIONS. */
693 
694  /* The SIZE_DYNAMIC_SECTIONS function is called by the ELF backend
695  linker after all the linker input files have been seen but before
696  the sections sizes have been set. This is called after
697  ADJUST_DYNAMIC_SYMBOL has been called on all appropriate symbols.
698  It is only called when linking against a dynamic object. It must
699  set the sizes of the dynamic sections, and may fill in their
700  contents as well. The generic ELF linker can handle the .dynsym,
701  .dynstr and .hash sections. This function must handle the
702  .interp section and any sections created by the
703  CREATE_DYNAMIC_SECTIONS entry point. */
705 
706  /* Set TEXT_INDEX_SECTION and DATA_INDEX_SECTION, the output sections
707  we keep to use as a base for relocs and symbols. */
708  void (*elf_backend_init_index_section)(bfd *output_bfd, struct bfd_link_info *info);
709 
710  /* The RELOCATE_SECTION function is called by the ELF backend linker
711  to handle the relocations for a section.
712 
713  The relocs are always passed as Rela structures; if the section
714  actually uses Rel structures, the rz_addend field will always be
715  zero.
716 
717  This function is responsible for adjust the section contents as
718  necessary, and (if using Rela relocs and generating a
719  relocatable output file) adjusting the reloc addend as
720  necessary.
721 
722  This function does not have to worry about setting the reloc
723  address or the reloc symbol index.
724 
725  LOCAL_SYMS is a pointer to the swapped in local symbols.
726 
727  LOCAL_SECTIONS is an array giving the section in the input file
728  corresponding to the st_shndx field of each local symbol.
729 
730  The global hash table entry for the global symbols can be found
731  via elf_sym_hashes (input_bfd).
732 
733  When generating relocatable output, this function must handle
734  STB_LOCAL/STT_SECTION symbols specially. The output symbol is
735  going to be the section symbol corresponding to the output
736  section, which means that the addend must be adjusted
737  accordingly.
738 
739  Returns FALSE on error, TRUE on success, 2 if successful and
740  relocations should be written for this section. */
741  int (*elf_backend_relocate_section)(bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd,
742  asection *input_section, bfd_byte *contents, Elf_Internal_Rela *relocs,
743  Elf_Internal_Sym *local_syms, asection **local_sections);
744 
745  /* The FINISH_DYNAMIC_SYMBOL function is called by the ELF backend
746  linker just before it writes a symbol out to the .dynsym section.
747  The processor backend may make any required adjustment to the
748  symbol. It may also take the opportunity to set contents of the
749  dynamic sections. Note that FINISH_DYNAMIC_SYMBOL is called on
750  all .dynsym symbols, while ADJUST_DYNAMIC_SYMBOL is only called
751  on those symbols which are defined by a dynamic object. */
753  struct elf_link_hash_entry *h, Elf_Internal_Sym *sym);
754 
755  /* The FINISH_DYNAMIC_SECTIONS function is called by the ELF backend
756  linker just before it writes all the dynamic sections out to the
757  output file. The FINISH_DYNAMIC_SYMBOL will have been called on
758  all dynamic symbols. */
760 
761  /* A function to do any beginning processing needed for the ELF file
762  before building the ELF headers and computing file positions. */
764 
765  /* A function to do any final processing needed for the ELF file
766  before writing it out. The LINKER argument is TRUE if this BFD
767  was created by the ELF backend linker. */
769 
770  /* This function is called by get_program_header_size. It should
771  return the number of additional program segments which this BFD
772  will need. It should return -1 on error. */
774 
775  /* This function is called to modify an existing segment map in a
776  backend specific fashion. */
778 
779  /* This function is called to modify program headers just before
780  they are written. */
782 
783  /* This function is called during section garbage collection to
784  mark sections that define global symbols. */
786 
787  /* This function is called during section gc to discover the section a
788  particular relocation refers to. */
790 
791  /* This function, if defined, is called after the first gc marking pass
792  to allow the backend to mark additional sections. */
794 
795  /* This function, if defined, is called during the sweep phase of gc
796  in order that a backend might update any data structures it might
797  be maintaining. */
799  const Elf_Internal_Rela *relocs);
800 
801  /* This function, if defined, is called after the ELF headers have
802  been created. This allows for things like the OS and ABI versions
803  to be changed. */
805 
806  /* This function, if defined, prints a symbol to file and returns the
807  name of the symbol to be printed. It should return NULL to fall
808  back to default symbol printing. */
809  const char *(*elf_backend_print_symbol_all)(bfd *, void *, asymbol *);
810 
811  /* This function, if defined, is called after all local symbols and
812  global symbols converted to locals are emitted into the symtab
813  section. It allows the backend to emit special local symbols
814  not handled in the hash table. */
816  bfd_boolean (*)(void *, const char *, Elf_Internal_Sym *, asection *,
817  struct elf_link_hash_entry *));
818 
819  /* This function, if defined, is called after all symbols are emitted
820  into the symtab section. It allows the backend to emit special
821  global symbols not handled in the hash table. */
823  bfd_boolean (*)(void *, const char *, Elf_Internal_Sym *, asection *,
824  struct elf_link_hash_entry *));
825 
826  /* Copy any information related to dynamic linking from a pre-existing
827  symbol to a newly created symbol. Also called to copy flags and
828  other back-end info to a weakdef, in which case the symbol is not
829  newly created and plt/got refcounts and dynamic indices should not
830  be copied. */
832  struct elf_link_hash_entry *);
833 
834  /* Modify any information related to dynamic linking such that the
835  symbol is not exported. */
837 
838  /* A function to do additional symbol fixup, called by
839  _bfd_elf_fix_symbol_flags. */
841 
842  /* Merge the backend specific symbol attribute. */
844  bfd_boolean);
845 
846  /* Decide whether an undefined symbol is special and can be ignored.
847  This is the case for OPTIONAL symbols on IRIX. */
849 
850  /* Emit relocations. Overrides default routine for emitting relocs,
851  except during a relocatable link, or if all relocs are being emitted. */
853  struct elf_link_hash_entry **);
854 
855  /* Count relocations. Not called for relocatable links
856  or if all relocs are being preserved in the output. */
858 
859  /* This function, if defined, is called when an NT_PRSTATUS note is found
860  in a core file. */
862 
863  /* This function, if defined, is called when an NT_PSINFO or NT_PRPSINFO
864  note is found in a core file. */
866 
867  /* This function, if defined, is called to write a note to a corefile. */
868  char *(*elf_backend_write_core_note)(bfd *abfd, char *buf, int *bufsiz, int note_type, ...);
869 
870  /* Functions to print VMAs. Special code to handle 64 bit ELF files. */
871  void (*elf_backend_sprintf_vma)(bfd *, char *, bfd_vma);
872  void (*elf_backend_fprintf_vma)(bfd *, void *, bfd_vma);
873 
874  /* This function returns class of a reloc type. */
876 
877  /* This function, if defined, removes information about discarded functions
878  from other sections which mention them. */
880 
881  /* This function, if defined, signals that the function above has removed
882  the discarded relocations for this section. */
884 
885  /* What to do when ld finds relocations against symbols defined in
886  discarded sections. */
887  unsigned int (*action_discarded)(asection *);
888 
889  /* This function returns the width of FDE pointers in bytes, or 0 if
890  that can't be determined for some reason. The default definition
891  goes by the bfd's EI_CLASS. */
893 
894  /* These functions tell elf-eh-frame whether to attempt to turn
895  absolute or lsda encodings into pc-relative ones. The default
896  definition enables these transformations. */
899 
900  /* This function returns an encoding after computing the encoded
901  value (and storing it in ENCODED) for the given OFFSET into OSEC,
902  to be stored in at LOC_OFFSET into the LOC_SEC input section.
903  The default definition chooses a 32-bit PC-relative encoding. */
905  asection *osec, bfd_vma offset,
906  asection *loc_sec, bfd_vma loc_offset,
907  bfd_vma *encoded);
908 
909  /* This function, if defined, may write out the given section.
910  Returns TRUE if it did so and FALSE if the caller should. */
912 
913  /* The level of IRIX compatibility we're striving for.
914  MIPS ELF specific function. */
916 
917  reloc_howto_type *(*elf_backend_mips_rtype_to_howto)(unsigned int, bfd_boolean);
918 
919  /* The swapping table to use when dealing with ECOFF information.
920  Used for the MIPS ELF .mdebug section. */
921  const struct ecoff_debug_swap *elf_backend_ecoff_debug_swap;
922 
923  /* This function implements `bfd_elf_bfd_from_remote_memory';
924  see elf.c, elfcode.h. */
925  bfd *(*elf_backend_bfd_from_remote_memory)(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
926  int (*target_read_memory)(bfd_vma vma, bfd_byte *myaddr, int len));
927 
928  /* This function is used by `_bfd_elf_get_synthetic_symtab';
929  see elf.c. */
930  bfd_vma (*plt_sym_val)(bfd_vma, const asection *, const arelent *);
931 
932  /* Is symbol defined in common section? */
934 
935  /* Return a common section index for section. */
937 
938  /* Return a common section for section. */
939  asection *(*common_section)(asection *);
940 
941  /* Return TRUE if we can merge 2 definitions. */
943  struct elf_link_hash_entry **,
944  struct elf_link_hash_entry *,
946  bfd_vma *, unsigned int *,
951  bfd *, asection **,
954  bfd *, asection **);
955 
956  /* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */
958 
959  /* Return TRUE if type is a function symbol type. */
961 
962  /* Used to handle bad SHF_LINK_ORDER input. */
964 
965  /* Name of the PLT relocation section. */
966  const char *relplt_name;
967 
968  /* Alternate EM_xxxx machine codes for this backend. */
971 
972  const struct elf_size_info *s;
973 
974  /* An array of target specific special sections. */
976 
977  /* The size in bytes of the header for the GOT. This includes the
978  so-called reserved entries on some systems. */
980 
981  /* The vendor name to use for a processor-standard attributes section. */
982  const char *obj_attrs_vendor;
983 
984  /* The section name to use for a processor-standard attributes section. */
985  const char *obj_attrs_section;
986 
987  /* Return 1, 2 or 3 to indicate what type of arguments a
988  processor-specific tag takes. */
990 
991  /* The section type to use for an attributes section. */
993 
994  /* This is TRUE if the linker should act like collect and gather
995  global constructors and destructors by name. This is TRUE for
996  MIPS ELF because the Irix 5 tools can not handle the .init
997  section. */
998  unsigned collect : 1;
999 
1000  /* This is TRUE if the linker should ignore changes to the type of a
1001  symbol. This is TRUE for MIPS ELF because some Irix 5 objects
1002  record undefined functions as STT_OBJECT although the definitions
1003  are STT_FUNC. */
1004  unsigned type_change_ok : 1;
1005 
1006  /* Whether the backend may use REL relocations. (Some backends use
1007  both REL and RELA relocations, and this flag is set for those
1008  backends.) */
1009  unsigned may_use_rel_p : 1;
1010 
1011  /* Whether the backend may use RELA relocations. (Some backends use
1012  both REL and RELA relocations, and this flag is set for those
1013  backends.) */
1014  unsigned may_use_rela_p : 1;
1015 
1016  /* Whether the default relocation type is RELA. If a backend with
1017  this flag set wants REL relocations for a particular section,
1018  it must note that explicitly. Similarly, if this flag is clear,
1019  and the backend wants RELA relocations for a particular
1020  section. */
1021  unsigned default_use_rela_p : 1;
1022 
1023  /* Set if RELA relocations for a relocatable link can be handled by
1024  generic code. Backends that set this flag need do nothing in the
1025  backend relocate_section routine for relocatable linking. */
1026  unsigned rela_normal : 1;
1027 
1028  /* TRUE if addresses "naturally" sign extend. This is used when
1029  swapping in from Elf32 when BFD64. */
1030  unsigned sign_extend_vma : 1;
1031 
1032  unsigned want_got_plt : 1;
1033  unsigned plt_readonly : 1;
1034  unsigned want_plt_sym : 1;
1035  unsigned plt_not_loaded : 1;
1036  unsigned plt_alignment : 4;
1037  unsigned can_gc_sections : 1;
1038  unsigned can_refcount : 1;
1039  unsigned want_got_sym : 1;
1040  unsigned want_dynbss : 1;
1041 
1042  /* Targets which do not support physical addressing often require
1043  that the p_paddr field in the section header to be set to zero.
1044  This field indicates whether this behavior is required. */
1046 
1047  /* True if an object file lacking a .note.GNU-stack section
1048  should be assumed to be requesting exec stack. At least one
1049  other file in the link needs to have a .note.GNU-stack section
1050  for a PT_GNU_STACK segment to be created. */
1051  unsigned default_execstack : 1;
1052 };
1053 
1054 /* Information stored for each BFD section in an ELF file. This
1055  structure is allocated by elf_new_section_hook. */
1056 
1058  /* The ELF header for this section. */
1060 
1061  /* The ELF header for the reloc section associated with this
1062  section, if any. */
1064 
1065  /* If there is a second reloc section associated with this section,
1066  as can happen on Irix 6, this field points to the header. */
1068 
1069  /* The number of relocations currently assigned to REL_HDR. */
1070  unsigned int rel_count;
1071 
1072  /* The number of relocations currently assigned to REL_HDR2. */
1073  unsigned int rel_count2;
1074 
1075  /* The ELF section number of this section. */
1077 
1078  /* The ELF section number of the reloc section indicated by
1079  REL_HDR if any. Only used for an output file. */
1080  int rel_idx;
1081 
1082  /* The ELF section number of the reloc section indicated by
1083  REL_HDR2 if any. Only used for an output file. */
1085 
1086  /* Used by the backend linker when generating a shared library to
1087  record the dynamic symbol index for a section symbol
1088  corresponding to this section. A value of 0 means that there is
1089  no dynamic symbol for this section. */
1090  int dynindx;
1091 
1092  /* A pointer to the linked-to section for SHF_LINK_ORDER. */
1094 
1095  /* Used by the backend linker to store the symbol hash table entries
1096  associated with relocs against global symbols. */
1098 
1099  /* A pointer to the swapped relocs. If the section uses REL relocs,
1100  rather than RELA, all the rz_addend fields will be zero. This
1101  pointer may be NULL. It is used by the backend linker. */
1103 
1104  /* A pointer to a linked list tracking dynamic relocs copied for
1105  local symbols. */
1107 
1108  /* A pointer to the bfd section used for dynamic relocs. */
1110 
1111  union {
1112  /* Group name, if this section is a member of a group. */
1113  const char *name;
1114 
1115  /* Group signature sym, if this is the SHT_GROUP section. */
1116  struct bfd_symbol *id;
1118 
1119  /* For a member of a group, points to the SHT_GROUP section.
1120  NULL for the SHT_GROUP section itself and non-group sections. */
1122 
1123  /* A linked list of member sections in the group. Circular when used by
1124  the linker. For the SHT_GROUP section, points at first member. */
1126 
1127  /* A pointer used for various section optimizations. */
1128  void *sec_info;
1129 };
1130 
1131 #define elf_section_data(sec) ((struct bfd_elf_section_data *)(sec)->used_by_bfd)
1132 #define elf_linked_to_section(sec) (elf_section_data(sec)->linked_to)
1133 #define elf_section_type(sec) (elf_section_data(sec)->this_hdr.sh_type)
1134 #define elf_section_flags(sec) (elf_section_data(sec)->this_hdr.sh_flags)
1135 #define elf_group_name(sec) (elf_section_data(sec)->group.name)
1136 #define elf_group_id(sec) (elf_section_data(sec)->group.id)
1137 #define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
1138 #define elf_sec_group(sec) (elf_section_data(sec)->sec_group)
1139 
1140 #define xvec_get_elf_backend_data(xvec) \
1141  ((const struct elf_backend_data *)(xvec)->backend_data)
1142 
1143 #define get_elf_backend_data(abfd) \
1144  xvec_get_elf_backend_data((abfd)->xvec)
1145 
1146 /* This struct is used to pass information to routines called via
1147  elf_link_hash_traverse which must return failure. */
1148 
1153 };
1154 
1155 /* This structure is used to pass information to
1156  _bfd_elf_link_assign_sym_version. */
1157 
1159  /* Output BFD. */
1161  /* General link information. */
1163  /* Version tree. */
1165  /* Whether we had a failure. */
1167 };
1168 
1169 /* This structure is used to pass information to
1170  _bfd_elf_link_find_version_dependencies. */
1171 
1173  /* Output BFD. */
1175  /* General link information. */
1177  /* The number of dependencies. */
1178  unsigned int vers;
1179  /* Whether we had a failure. */
1181 };
1182 
1183 /* The maximum number of known object attributes for any target. */
1184 #define NUM_KNOWN_OBJ_ATTRIBUTES 32
1185 
1186 /* The value of an object attribute. type & 1 indicates whether there
1187  is an integer value; type & 2 indicates whether there is a string
1188  value. */
1189 
1190 typedef struct obj_attribute {
1191  int type;
1192  unsigned int i;
1193  char *s;
1195 
1196 typedef struct obj_attribute_list {
1198  int tag;
1201 
1202 /* Object attributes may either be defined by the processor ABI, index
1203  OBJ_ATTR_PROC in the *_obj_attributes arrays, or be GNU-specific
1204  (and possibly also processor-specific), index OBJ_ATTR_GNU. */
1205 #define OBJ_ATTR_PROC 0
1206 #define OBJ_ATTR_GNU 1
1207 #define OBJ_ATTR_FIRST OBJ_ATTR_PROC
1208 #define OBJ_ATTR_LAST OBJ_ATTR_GNU
1209 
1210 /* The following object attribute tags are taken as generic, for all
1211  targets and for "gnu" where there is no target standard. */
1212 enum {
1217  Tag_compatibility = 32
1218 };
1219 
1220 /* Some private data is stashed away for future use using the tdata pointer
1221  in the bfd structure. */
1222 
1224  Elf_Internal_Ehdr elf_header[1]; /* Actual data, but ref like ptr */
1228  struct elf_strtab_hash *strtab_ptr;
1231  unsigned int num_elf_sections; /* elf_sect_ptr size */
1233  asymbol **section_syms; /* STT_SECTION symbols for each section */
1245  unsigned int symtab_shndx_section;
1248  bfd_vma gp; /* The gp value */
1249  unsigned int gp_size; /* The gp size */
1250 
1251  /* Information grabbed from an elf core file. */
1257 
1258  /* A mapping from external symbols to entries in the linker hash
1259  table, used when linking. This is indexed by the symbol index
1260  minus the sh_info field of the symbol table header. */
1262 
1263  /* Track usage and final offsets of GOT entries for local symbols.
1264  This array is indexed by symbol index. Elements are used
1265  identically to "got" in struct elf_link_hash_entry. */
1266  union {
1269  struct got_entry **ents;
1271 
1272  /* The linker ELF emulation code needs to let the backend ELF linker
1273  know what filename should be used for a dynamic object if the
1274  dynamic object is found using a search. The emulation code then
1275  sometimes needs to know what name was actually used. Until the
1276  file has been added to the linker symbol table, this field holds
1277  the name the linker wants. After it has been added, it holds the
1278  name actually used, which will be the DT_SONAME entry if there is
1279  one. */
1280  const char *dt_name;
1281 
1282  /* Records the result of `get_program_header_size'. */
1284 
1285  /* Used by find_nearest_line entry point. */
1286  void *line_info;
1287 
1288  /* Used by MIPS ELF find_nearest_line entry point. The structure
1289  could be included directly in this one, but there's no point to
1290  wasting the memory just for the infrequently called
1291  find_nearest_line. */
1292  struct mips_elf_find_line *find_line_info;
1293 
1294  /* A place to stash dwarf1 info for this bfd. */
1295  struct dwarf1_debug *dwarf1_find_line_info;
1296 
1297  /* A place to stash dwarf2 info for this bfd. */
1299 
1300  /* An array of stub sections indexed by symbol number, used by the
1301  MIPS ELF linker. FIXME: We should figure out some way to only
1302  include this field for a MIPS ELF target. */
1305 
1306  /* Used to determine if PT_GNU_EH_FRAME segment header should be
1307  created. */
1309 
1312 
1313  /* Number of symbol version definitions we are about to emit. */
1314  unsigned int cverdefs;
1315 
1316  /* Number of symbol version references we are about to emit. */
1317  unsigned int cverrefs;
1318 
1319  /* Segment flags for the PT_GNU_STACK segment. */
1320  unsigned int stack_flags;
1321 
1322  /* Should the PT_GNU_RELRO segment be emitted? */
1324 
1325  /* Symbol version definitions in external objects. */
1327 
1328  /* Symbol version references to external objects. */
1330 
1331  /* The Irix 5 support uses two virtual sections, which represent
1332  text/data symbols defined in dynamic objects. */
1337 
1338  /* Whether a dyanmic object was specified normally on the linker
1339  command line, or was specified when --as-needed was in effect,
1340  or was found via a DT_NEEDED entry. */
1342 
1343  /* This is set to TRUE if the object was created by the backend
1344  linker. */
1346 
1347  /* Irix 5 often messes up the symbol table, sorting local symbols
1348  after global symbols. This flag is set if the symbol table in
1349  this BFD appears to be messed up. If it is, we ignore the
1350  sh_info field in the symbol table header, and always read all the
1351  symbols. */
1353 
1354  /* Used to determine if the e_flags field has been initialized */
1356 
1357  /* Symbol buffer. */
1358  void *symbuf;
1359 
1362 
1363  /* Called at the end of _bfd_elf_write_object_contents if not NULL. */
1366 };
1367 
1368 #define elf_tdata(bfd) ((bfd)->tdata.elf_obj_data)
1369 #define elf_elfheader(bfd) (elf_tdata(bfd)->elf_header)
1370 #define elf_elfsections(bfd) (elf_tdata(bfd)->elf_sect_ptr)
1371 #define elf_numsections(bfd) (elf_tdata(bfd)->num_elf_sections)
1372 #define elf_shstrtab(bfd) (elf_tdata(bfd)->strtab_ptr)
1373 #define elf_onesymtab(bfd) (elf_tdata(bfd)->symtab_section)
1374 #define elf_symtab_shndx(bfd) (elf_tdata(bfd)->symtab_shndx_section)
1375 #define elf_dynsymtab(bfd) (elf_tdata(bfd)->dynsymtab_section)
1376 #define elf_dynversym(bfd) (elf_tdata(bfd)->dynversym_section)
1377 #define elf_dynverdef(bfd) (elf_tdata(bfd)->dynverdef_section)
1378 #define elf_dynverref(bfd) (elf_tdata(bfd)->dynverref_section)
1379 #define elf_num_locals(bfd) (elf_tdata(bfd)->num_locals)
1380 #define elf_num_globals(bfd) (elf_tdata(bfd)->num_globals)
1381 #define elf_section_syms(bfd) (elf_tdata(bfd)->section_syms)
1382 #define elf_num_section_syms(bfd) (elf_tdata(bfd)->num_section_syms)
1383 #define core_prpsinfo(bfd) (elf_tdata(bfd)->prpsinfo)
1384 #define core_prstatus(bfd) (elf_tdata(bfd)->prstatus)
1385 #define elf_gp(bfd) (elf_tdata(bfd)->gp)
1386 #define elf_gp_size(bfd) (elf_tdata(bfd)->gp_size)
1387 #define elf_sym_hashes(bfd) (elf_tdata(bfd)->sym_hashes)
1388 #define elf_local_got_refcounts(bfd) (elf_tdata(bfd)->local_got.refcounts)
1389 #define elf_local_got_offsets(bfd) (elf_tdata(bfd)->local_got.offsets)
1390 #define elf_local_got_ents(bfd) (elf_tdata(bfd)->local_got.ents)
1391 #define elf_dt_name(bfd) (elf_tdata(bfd)->dt_name)
1392 #define elf_dyn_lib_class(bfd) (elf_tdata(bfd)->dyn_lib_class)
1393 #define elf_bad_symtab(bfd) (elf_tdata(bfd)->bad_symtab)
1394 #define elf_flags_init(bfd) (elf_tdata(bfd)->flags_init)
1395 #define elf_known_obj_attributes(bfd) (elf_tdata(bfd)->known_obj_attributes)
1396 #define elf_other_obj_attributes(bfd) (elf_tdata(bfd)->other_obj_attributes)
1397 #define elf_known_obj_attributes_proc(bfd) \
1398  (elf_known_obj_attributes(bfd)[OBJ_ATTR_PROC])
1399 #define elf_other_obj_attributes_proc(bfd) \
1400  (elf_other_obj_attributes(bfd)[OBJ_ATTR_PROC])
1401 
1410 extern void _bfd_elf_swap_versym_in(bfd *, const Elf_External_Versym *, Elf_Internal_Versym *);
1411 extern void _bfd_elf_swap_versym_out(bfd *, const Elf_Internal_Versym *, Elf_External_Versym *);
1412 
1414 extern char *bfd_elf_string_from_elf_section(bfd *, unsigned, unsigned);
1415 extern char *bfd_elf_get_str_section(bfd *, unsigned);
1419 
1423 
1424 extern void _bfd_elf_sprintf_vma(bfd *, char *, bfd_vma);
1425 extern void _bfd_elf_fprintf_vma(bfd *, void *, bfd_vma);
1426 
1427 extern unsigned int _bfd_elf_eh_frame_address_size(bfd *, asection *);
1429  asection *loc_sec, bfd_vma loc_offset, bfd_vma *encoded);
1430 extern bfd_boolean _bfd_elf_can_make_relative(bfd *input_bfd, struct bfd_link_info *info, asection *eh_frame_section);
1431 
1436 
1437 extern unsigned long bfd_elf_hash(const char *);
1438 extern unsigned long bfd_elf_gnu_hash(const char *);
1439 
1446 extern struct bfd_hash_entry *_bfd_elf_link_hash_newfunc(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
1449  struct elf_link_hash_entry *);
1453  struct bfd_hash_entry *(*)(struct bfd_hash_entry *, struct bfd_hash_table *, const char *),
1454  unsigned int);
1460 extern void bfd_elf_set_group_contents(bfd *, asection *, void *);
1465 #define _bfd_generic_init_private_section_data \
1466  _bfd_elf_init_private_section_data
1476 extern long _bfd_elf_get_synthetic_symtab(bfd *, long, asymbol **, long, asymbol **, asymbol **);
1486 extern bfd_boolean _bfd_elf_find_nearest_line(bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
1487  unsigned int *);
1488 extern bfd_boolean _bfd_elf_find_line(bfd *, asymbol **, asymbol *, const char **, unsigned int *);
1489 #define _bfd_generic_find_line _bfd_elf_find_line
1490 extern bfd_boolean _bfd_elf_find_inliner_info(bfd *, const char **, const char **, unsigned int *);
1491 #define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
1492 #define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
1496 extern const struct bfd_elf_special_section *_bfd_elf_get_special_section(const char *, const struct bfd_elf_special_section *, unsigned int);
1498 
1499 /* If the target doesn't have reloc handling written yet: */
1501 
1502 extern bfd_boolean bfd_section_from_shdr(bfd *, unsigned int shindex);
1504 
1506 
1507 extern asection *bfd_section_from_r_symndx(bfd *, struct sym_sec_cache *, asection *, unsigned long);
1508 extern asection *bfd_section_from_elf_index(bfd *, unsigned int);
1509 extern struct bfd_strtab_hash *_bfd_elf_stringtab_init(void);
1510 
1511 extern struct elf_strtab_hash *_bfd_elf_strtab_init(void);
1512 extern void _bfd_elf_strtab_free(struct elf_strtab_hash *);
1513 extern bfd_size_type _bfd_elf_strtab_add(struct elf_strtab_hash *, const char *, bfd_boolean);
1514 extern void _bfd_elf_strtab_addref(struct elf_strtab_hash *, bfd_size_type);
1515 extern void _bfd_elf_strtab_delref(struct elf_strtab_hash *, bfd_size_type);
1516 extern void _bfd_elf_strtab_clear_all_refs(struct elf_strtab_hash *);
1517 extern bfd_size_type _bfd_elf_strtab_size(struct elf_strtab_hash *);
1518 extern bfd_size_type _bfd_elf_strtab_offset(struct elf_strtab_hash *, bfd_size_type);
1519 extern bfd_boolean _bfd_elf_strtab_emit(bfd *, struct elf_strtab_hash *);
1520 extern void _bfd_elf_strtab_finalize(struct elf_strtab_hash *);
1521 
1523  bfd_boolean (*)(bfd_vma, void *), struct elf_reloc_cookie *);
1529 
1531  asection **, bfd_vma *, unsigned int *,
1532  struct elf_link_hash_entry **, bfd_boolean *,
1534 
1536 
1538  const char *, Elf_Internal_Sym *, asection **, bfd_vma *,
1540 
1542 
1544 
1546 
1551 
1553 
1558 extern struct elf_link_hash_entry *_bfd_elf_define_linkage_sym(bfd *, struct bfd_link_info *, asection *, const char *);
1561 
1563 extern char *_bfd_elfcore_strndup(bfd *, char *, size_t);
1564 
1566 
1568 
1570  struct elf_link_hash_entry **);
1571 
1573 
1575 
1577 
1579 
1581 
1583 
1585 
1587  struct bfd_link_info *info,
1588  bfd *input_bfd,
1589  asection *input_section,
1590  bfd_byte *contents,
1591  Elf_Internal_Rela *rel,
1592  Elf_Internal_Sym *local_syms,
1593  asection **local_sections);
1594 
1596 
1597 extern void _bfd_elf_set_osabi(bfd *, struct bfd_link_info *);
1598 
1604 
1605 extern bfd_boolean bfd_elf32_swap_symbol_in(bfd *, const void *, const void *, Elf_Internal_Sym *);
1606 extern void bfd_elf32_swap_symbol_out(bfd *, const Elf_Internal_Sym *, void *, void *);
1613 extern void bfd_elf32_swap_dyn_in(bfd *, const void *, Elf_Internal_Dyn *);
1614 extern void bfd_elf32_swap_dyn_out(bfd *, const Elf_Internal_Dyn *, void *);
1617 extern int bfd_elf32_write_out_phdrs(bfd *, const Elf_Internal_Phdr *, unsigned int);
1618 extern bfd_boolean bfd_elf32_checksum_contents(bfd *, void (*)(const void *, size_t, void *), void *);
1619 extern void bfd_elf32_write_relocs(bfd *, asection *, void *);
1621 
1627 
1628 extern bfd_boolean bfd_elf64_swap_symbol_in(bfd *, const void *, const void *, Elf_Internal_Sym *);
1629 extern void bfd_elf64_swap_symbol_out(bfd *, const Elf_Internal_Sym *, void *, void *);
1636 extern void bfd_elf64_swap_dyn_in(bfd *, const void *, Elf_Internal_Dyn *);
1637 extern void bfd_elf64_swap_dyn_out(bfd *, const Elf_Internal_Dyn *, void *);
1640 extern int bfd_elf64_write_out_phdrs(bfd *, const Elf_Internal_Phdr *, unsigned int);
1641 extern bfd_boolean bfd_elf64_checksum_contents(bfd *, void (*)(const void *, size_t, void *), void *);
1642 extern void bfd_elf64_write_relocs(bfd *, asection *, void *);
1644 
1645 extern struct elf_link_hash_entry *_bfd_elf_archive_symbol_lookup(bfd *, struct bfd_link_info *, const char *);
1648 
1650 
1652 
1654  Elf_Internal_Sym *);
1655 
1657 
1659 
1661 
1663 
1665 
1667  asection *, bfd *, char **);
1668 
1670 
1672 
1674 
1676 
1678 
1681 
1683  asection *(*)(asection *, struct bfd_link_info *, Elf_Internal_Rela *,
1684  struct elf_link_hash_entry *, Elf_Internal_Sym *));
1685 
1687 
1689 
1691 
1693 
1695 
1697 
1698 /* Exported interface for writing elf corefile notes. */
1699 extern char *elfcore_write_note(bfd *, char *, int *, const char *, int, const void *, int);
1700 extern char *elfcore_write_prpsinfo(bfd *, char *, int *, const char *, const char *);
1701 extern char *elfcore_write_prstatus(bfd *, char *, int *, long, int, const void *);
1702 extern char *elfcore_write_pstatus(bfd *, char *, int *, long, int, const void *);
1703 extern char *elfcore_write_prfpreg(bfd *, char *, int *, const void *, int);
1704 extern char *elfcore_write_prxfpreg(bfd *, char *, int *, const void *, int);
1705 extern char *elfcore_write_lwpstatus(bfd *, char *, int *, long, int, const void *);
1706 
1707 extern bfd *_bfd_elf32_bfd_from_remote_memory(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
1708  int (*target_read_memory)(bfd_vma, bfd_byte *, int));
1709 extern bfd *_bfd_elf64_bfd_from_remote_memory(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
1710  int (*target_read_memory)(bfd_vma, bfd_byte *, int));
1711 
1714 extern int bfd_elf_get_obj_attr_int(bfd *, int, int);
1715 extern void bfd_elf_add_obj_attr_int(bfd *, int, int, unsigned int);
1716 #define bfd_elf_add_proc_attr_int(BFD, TAG, VALUE) \
1717  bfd_elf_add_obj_attr_int((BFD), OBJ_ATTR_PROC, (TAG), (VALUE))
1718 extern void bfd_elf_add_obj_attr_string(bfd *, int, int, const char *);
1719 #define bfd_elf_add_proc_attr_string(BFD, TAG, VALUE) \
1720  bfd_elf_add_obj_attr_string((BFD), OBJ_ATTR_PROC, (TAG), (VALUE))
1721 extern void bfd_elf_add_obj_attr_compat(bfd *, int, unsigned int,
1722  const char *);
1723 #define bfd_elf_add_proc_attr_compat(BFD, INTVAL, STRVAL) \
1724  bfd_elf_add_obj_attr_compat((BFD), OBJ_ATTR_PROC, (INTVAL), (STRVAL))
1725 
1726 extern char *_bfd_elf_attr_strdup(bfd *, const char *);
1728 extern int _bfd_elf_obj_attrs_arg_type(bfd *, int, int);
1731 
1732 /* Large common section. */
1734 
1735 /* SH ELF specific routine. */
1736 
1738 
1739 /* This is the condition under which finish_dynamic_symbol will be called.
1740  If our finish_dynamic_symbol isn't called, we'll need to do something
1741  about initializing any .plt and .got entries in relocate_section. */
1742 #define WILL_CALL_FINISH_DYNAMIC_SYMBOL(DYN, SHARED, H) \
1743  ((DYN) && ((SHARED) || !(H)->forced_local) && ((H)->dynindx != -1 || (H)->forced_local))
1744 
1745 /* This macro is to avoid lots of duplicated code in the body
1746  of xxx_relocate_section() in the various elfxx-xxxx.c files. */
1747 #define RELOC_FOR_GLOBAL_SYMBOL(info, input_bfd, input_section, rel, \
1748  rz_symndx, symtab_hdr, sym_hashes, \
1749  h, sec, relocation, \
1750  unresolved_reloc, warned) \
1751  do { \
1752  /* It seems this can happen with erroneous or unsupported \
1753  input (mixing a.out and elf in an archive, for example.) */ \
1754  if (!sym_hashes) \
1755  return FALSE; \
1756 \
1757  h = sym_hashes[rz_symndx - symtab_hdr->sh_info]; \
1758 \
1759  while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) \
1760  h = (struct elf_link_hash_entry *)h->root.u.i.link; \
1761 \
1762  warned = FALSE; \
1763  unresolved_reloc = FALSE; \
1764  relocation = 0; \
1765  if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { \
1766  sec = h->root.u.def.section; \
1767  if (!sec || !sec->output_section) \
1768  /* Set a flag that will be cleared later if we find a \
1769  relocation value for this symbol. output_section \
1770  is typically NULL for symbols satisfied by a shared \
1771  library. */ \
1772  unresolved_reloc = TRUE; \
1773  else \
1774  relocation = (h->root.u.def.value + sec->output_section->vma + sec->output_offset); \
1775  } else if (h->root.type == bfd_link_hash_undefweak) \
1776  ; \
1777  else if (info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY(h->other) == STV_DEFAULT) \
1778  ; \
1779  else if (!info->relocatable) { \
1780  bfd_boolean err; \
1781  err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR || ELF_ST_VISIBILITY(h->other) != STV_DEFAULT); \
1782  if (!info->callbacks->undefined_symbol(info, \
1783  h->root.root.string, \
1784  input_bfd, \
1785  input_section, \
1786  rel->rz_offset, err)) \
1787  return FALSE; \
1788  warned = TRUE; \
1789  } \
1790  } while (0)
1791 
1792 /* Will a symbol be bound to the definition within the shared
1793  library, if any. */
1794 #define SYMBOLIC_BIND(INFO, H) \
1795  ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic))
1796 
1797 #endif /* _LIBELF_H_ */
size_t len
Definition: 6502dis.c:15
RzBinInfo * info(RzBinFile *bf)
Definition: bin_ne.c:86
RzList * relocs(RzBinFile *bf)
Definition: bin_ne.c:114
static int value
Definition: cmd_api.c:93
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags long
Definition: sflib.h:79
bfd_boolean _bfd_elf_setup_sections(bfd *)
void bfd_elf32_swap_dyn_in(bfd *, const void *, Elf_Internal_Dyn *)
bfd_boolean bfd_elf_link_record_dynamic_symbol(struct bfd_link_info *, struct elf_link_hash_entry *)
bfd_boolean bfd_elf_match_symbols_in_sections(asection *, asection *, struct bfd_link_info *)
long _bfd_elf_canonicalize_dynamic_reloc(bfd *, arelent **, asymbol **)
asection _bfd_elf_large_com_section
void bfd_elf64_write_relocs(bfd *, asection *, void *)
bfd_reloc_status_type bfd_elf_generic_reloc(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **)
unsigned long bfd_elf_hash(const char *)
void bfd_elf_perform_complex_relocation(bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, bfd *input_bfd, asection *input_section, bfd_byte *contents, Elf_Internal_Rela *rel, Elf_Internal_Sym *local_syms, asection **local_sections)
bfd_vma bfd_elf_obj_attr_size(bfd *)
bfd_boolean _bfd_elf_create_got_section(bfd *, struct bfd_link_info *)
bfd_boolean bfd_elf_gc_record_vtinherit(bfd *, asection *, struct elf_link_hash_entry *, bfd_vma)
bfd_boolean _bfd_elf_print_private_bfd_data(bfd *, void *)
asection * bfd_section_from_r_symndx(bfd *, struct sym_sec_cache *, asection *, unsigned long)
long _bfd_elf_canonicalize_reloc(bfd *, sec_ptr, arelent **, asymbol **)
bfd_boolean _bfd_elf_discard_section_eh_frame(bfd *, struct bfd_link_info *, asection *, bfd_boolean(*)(bfd_vma, void *), struct elf_reloc_cookie *)
Elf_Internal_Sym * bfd_elf_get_elf_syms(bfd *, Elf_Internal_Shdr *, size_t, size_t, Elf_Internal_Sym *, void *, Elf_External_Sym_Shndx *)
bfd_boolean _bfd_elf_close_and_cleanup(bfd *)
void bfd_elf64_swap_dyn_out(bfd *, const Elf_Internal_Dyn *, void *)
Elf_Internal_Shdr * bfd_elf_find_section(bfd *, char *)
bfd_size_type _bfd_elf_strtab_size(struct elf_strtab_hash *)
char * elfcore_write_prfpreg(bfd *, char *, int *, const void *, int)
void _bfd_elf_assign_file_positions_for_relocs(bfd *)
bfd_boolean _bfd_elf_make_section_from_shdr(bfd *, Elf_Internal_Shdr *, const char *, int)
bfd_boolean _sh_elf_set_mach_from_flags(bfd *)
void bfd_elf_add_obj_attr_compat(bfd *, int, unsigned int, const char *)
const struct bfd_elf_special_section * _bfd_elf_get_special_section(const char *, const struct bfd_elf_special_section *, unsigned int)
void bfd_elf_print_symbol(bfd *, void *, asymbol *, bfd_print_symbol_type)
bfd_boolean _bfd_elf_write_section_eh_frame(bfd *, struct bfd_link_info *, asection *, bfd_byte *)
bfd_size_type _bfd_elf_strtab_add(struct elf_strtab_hash *, const char *, bfd_boolean)
Elf_Internal_Rela * _bfd_elf_link_read_relocs(bfd *, asection *, void *, Elf_Internal_Rela *, bfd_boolean)
bfd_boolean _bfd_elf_merge_symbol(bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection **, bfd_vma *, unsigned int *, struct elf_link_hash_entry **, bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd_boolean *)
char * bfd_elf_get_str_section(bfd *, unsigned)
bfd_boolean _bfd_elf_validate_reloc(bfd *, arelent *)
bfd_boolean _bfd_elf_init_reloc_shdr(bfd *, Elf_Internal_Shdr *, asection *, bfd_boolean)
bfd_boolean _bfd_elf_set_arch_mach(bfd *, enum bfd_architecture, unsigned long)
char * bfd_elf64_core_file_failing_command(bfd *)
int bfd_elf32_core_file_failing_signal(bfd *)
void _bfd_elf_swap_verdef_in(bfd *, const Elf_External_Verdef *, Elf_Internal_Verdef *)
void _bfd_elf_set_osabi(bfd *, struct bfd_link_info *)
bfd_boolean bfd_elf_mkobject(bfd *)
void bfd_elf32_swap_phdr_in(bfd *, const Elf32_External_Phdr *, Elf_Internal_Phdr *)
void _bfd_elf_swap_verdaux_out(bfd *, const Elf_Internal_Verdaux *, Elf_External_Verdaux *)
char * elfcore_write_lwpstatus(bfd *, char *, int *, long, int, const void *)
void _bfd_elf_link_just_syms(asection *, struct bfd_link_info *)
bfd_boolean bfd_elf64_slurp_reloc_table(bfd *, asection *, asymbol **, bfd_boolean)
const struct bfd_elf_special_section * _bfd_elf_get_sec_type_attr(bfd *, asection *)
bfd_boolean _bfd_elf_match_sections_by_type(bfd *, const asection *, bfd *, const asection *)
void bfd_elf32_write_relocs(bfd *, asection *, void *)
bfd_boolean bfd_elf64_swap_symbol_in(bfd *, const void *, const void *, Elf_Internal_Sym *)
bfd_boolean _bfd_elf_find_inliner_info(bfd *, const char **, const char **, unsigned int *)
bfd_boolean _bfd_elf_write_section_eh_frame_hdr(bfd *, struct bfd_link_info *)
bfd_boolean bfd_elf32_swap_symbol_in(bfd *, const void *, const void *, Elf_Internal_Sym *)
asymbol * _bfd_elf_make_empty_symbol(bfd *)
void _bfd_elf_no_info_to_howto(bfd *, arelent *, Elf_Internal_Rela *)
void bfd_elf64_swap_symbol_out(bfd *, const Elf_Internal_Sym *, void *, void *)
void _bfd_elf_parse_attributes(bfd *, Elf_Internal_Shdr *)
long bfd_elf64_slurp_symbol_table(bfd *, asymbol **, bfd_boolean)
void _bfd_elf_strtab_delref(struct elf_strtab_hash *, bfd_size_type)
bfd_boolean _bfd_elf_export_symbol(struct elf_link_hash_entry *, void *)
void bfd_elf64_swap_reloc_in(bfd *, const bfd_byte *, Elf_Internal_Rela *)
asection * _bfd_elf_check_kept_section(asection *, struct bfd_link_info *)
void _bfd_elf_link_hash_hide_symbol(struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean)
void _bfd_elf_section_already_linked(bfd *, struct bfd_section *, struct bfd_link_info *)
void bfd_elf_add_obj_attr_string(bfd *, int, int, const char *)
long _bfd_elf_get_synthetic_symtab(bfd *, long, asymbol **, long, asymbol **, asymbol **)
void _bfd_elf_fprintf_vma(bfd *, void *, bfd_vma)
bfd_boolean bfd_elf_gc_sections(bfd *, struct bfd_link_info *)
int bfd_elf64_write_out_phdrs(bfd *, const Elf_Internal_Phdr *, unsigned int)
bfd_boolean _bfd_elf_new_section_hook(bfd *, asection *)
bfd_boolean bfd_elf64_write_shdrs_and_ehdr(bfd *)
void _bfd_elf_strtab_addref(struct elf_strtab_hash *, bfd_size_type)
void bfd_elf64_swap_phdr_out(bfd *, const Elf_Internal_Phdr *, Elf64_External_Phdr *)
elf_reloc_type_class
Definition: elf-bfd.h:466
@ reloc_class_copy
Definition: elf-bfd.h:470
@ reloc_class_plt
Definition: elf-bfd.h:469
@ reloc_class_relative
Definition: elf-bfd.h:468
@ reloc_class_normal
Definition: elf-bfd.h:467
long _bfd_elf_get_reloc_upper_bound(bfd *, sec_ptr)
void bfd_elf64_swap_reloc_out(bfd *, const Elf_Internal_Rela *, bfd_byte *)
bfd_boolean _bfd_elf_link_assign_sym_version(struct elf_link_hash_entry *, void *)
bfd_boolean _bfd_elf_copy_private_symbol_data(bfd *, asymbol *, bfd *, asymbol *)
struct bfd_link_hash_table * _bfd_elf_link_hash_table_create(bfd *)
bfd_vma _bfd_elf_eh_frame_section_offset(bfd *, struct bfd_link_info *, asection *, bfd_vma)
void bfd_elf64_swap_phdr_in(bfd *, const Elf64_External_Phdr *, Elf_Internal_Phdr *)
bfd_boolean bfd_section_from_shdr(bfd *, unsigned int shindex)
struct bfd_strtab_hash * _bfd_elf_stringtab_init(void)
bfd_boolean _bfd_elf_init_private_section_data(bfd *, asection *, bfd *, asection *, struct bfd_link_info *)
@ Tag_NULL
Definition: elf-bfd.h:1213
@ Tag_Symbol
Definition: elf-bfd.h:1216
@ Tag_Section
Definition: elf-bfd.h:1215
@ Tag_File
Definition: elf-bfd.h:1214
@ Tag_compatibility
Definition: elf-bfd.h:1217
bfd_boolean bfd_elf_is_group_section(bfd *, const struct bfd_section *)
bfd_boolean _bfd_elf_discard_section_eh_frame_hdr(bfd *, struct bfd_link_info *)
action_discarded
Definition: elf-bfd.h:507
@ PRETEND
Definition: elf-bfd.h:509
@ COMPLAIN
Definition: elf-bfd.h:508
struct elf_strtab_hash * _bfd_elf_strtab_init(void)
void bfd_elf32_swap_dyn_out(bfd *, const Elf_Internal_Dyn *, void *)
void _bfd_elf_swap_versym_out(bfd *, const Elf_Internal_Versym *, Elf_External_Versym *)
struct obj_attribute obj_attribute
bfd_boolean _bfd_elf_write_object_contents(bfd *)
int bfd_elf_link_record_local_dynamic_symbol(struct bfd_link_info *, bfd *, long)
bfd_boolean bfd_elf_gc_record_vtentry(bfd *, asection *, struct elf_link_hash_entry *, bfd_vma)
bfd_vma _bfd_elf_rela_local_sym(bfd *, Elf_Internal_Sym *, asection **, Elf_Internal_Rela *)
bfd_boolean _bfd_elf_compute_section_file_positions(bfd *, struct bfd_link_info *)
bfd_boolean _bfd_elf_add_default_symbol(bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, const char *, Elf_Internal_Sym *, asection **, bfd_vma *, bfd_boolean *, bfd_boolean)
struct elf_link_hash_entry * _bfd_elf_define_linkage_sym(bfd *, struct bfd_link_info *, asection *, const char *)
void bfd_elf32_swap_reloc_in(bfd *, const bfd_byte *, Elf_Internal_Rela *)
bfd_boolean _bfd_elfcore_make_pseudosection(bfd *, char *, size_t, ufile_ptr)
void bfd_elf32_swap_reloca_out(bfd *, const Elf_Internal_Rela *, bfd_byte *)
long _bfd_elf_get_dynamic_reloc_upper_bound(bfd *)
void _bfd_elf_strtab_free(struct elf_strtab_hash *)
void _bfd_elf_swap_versym_in(bfd *, const Elf_External_Versym *, Elf_Internal_Versym *)
bfd_boolean _bfd_elf_make_section_from_phdr(bfd *, Elf_Internal_Phdr *, int, const char *)
bfd_boolean _bfd_elf_link_hash_table_init(struct elf_link_hash_table *, bfd *, struct bfd_hash_entry *(*)(struct bfd_hash_entry *, struct bfd_hash_table *, const char *), unsigned int)
unsigned long bfd_elf_gnu_hash(const char *)
void _bfd_elf_link_hash_copy_indirect(struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_link_hash_entry *)
bfd_boolean _bfd_elf_link_hash_fixup_symbol(struct bfd_link_info *, struct elf_link_hash_entry *)
long _bfd_elf_canonicalize_symtab(bfd *, asymbol **)
bfd_boolean _bfd_elf_add_dynamic_entry(struct bfd_link_info *, bfd_vma, bfd_vma)
bfd_boolean _bfd_elf_find_nearest_line(bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, unsigned int *)
int bfd_elf32_write_out_phdrs(bfd *, const Elf_Internal_Phdr *, unsigned int)
void bfd_elf64_swap_dyn_in(bfd *, const void *, Elf_Internal_Dyn *)
bfd_boolean bfd_elf32_write_shdrs_and_ehdr(bfd *)
void bfd_elf_link_mark_dynamic_symbol(struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *)
bfd_boolean _bfd_elf_adjust_dynamic_copy(struct elf_link_hash_entry *, asection *)
bfd_boolean bfd_section_from_phdr(bfd *, Elf_Internal_Phdr *, int)
bfd_boolean _bfd_elf_link_find_version_dependencies(struct elf_link_hash_entry *, void *)
bfd_boolean _bfd_elf_find_line(bfd *, asymbol **, asymbol *, const char **, unsigned int *)
bfd_boolean _bfd_elf_is_function_type(unsigned int)
bfd * _bfd_elf32_bfd_from_remote_memory(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, int(*target_read_memory)(bfd_vma, bfd_byte *, int))
bfd_boolean _bfd_elf_link_sec_merge_syms(struct elf_link_hash_entry *, void *)
bfd_boolean bfd_elf32_core_file_matches_executable_p(bfd *, bfd *)
bfd_boolean bfd_elf_final_link(bfd *, struct bfd_link_info *)
bfd_boolean bfd_elf_gc_common_finalize_got_offsets(bfd *, struct bfd_link_info *)
long _bfd_elf_get_dynamic_symtab_upper_bound(bfd *)
char * elfcore_write_note(bfd *, char *, int *, const char *, int, const void *, int)
bfd_boolean _bfd_elf_copy_private_section_data(bfd *, asection *, bfd *, asection *)
bfd_boolean _bfd_elf_dynamic_symbol_p(struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean)
bfd_boolean bfd_elf_mkcorefile(bfd *)
struct elf_link_hash_entry * _bfd_elf_archive_symbol_lookup(bfd *, struct bfd_link_info *, const char *)
bfd_boolean bfd_elf_link_add_symbols(bfd *, struct bfd_link_info *)
char * _bfd_elfcore_strndup(bfd *, char *, size_t)
int _bfd_elf_sizeof_headers(bfd *, struct bfd_link_info *)
alent * _bfd_elf_get_lineno(bfd *, asymbol *)
void bfd_elf64_swap_reloca_in(bfd *, const bfd_byte *, Elf_Internal_Rela *)
#define LOCAL_SYM_CACHE_SIZE
Definition: elf-bfd.h:408
unsigned int _bfd_elf_eh_frame_address_size(bfd *, asection *)
struct obj_attribute_list obj_attribute_list
bfd_boolean _bfd_elf_gc_mark(struct bfd_link_info *, asection *, asection *(*)(asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *))
bfd_boolean _bfd_elf_copy_private_bfd_data(bfd *, bfd *)
bfd_boolean bfd_elf64_core_file_matches_executable_p(bfd *, bfd *)
void _bfd_elf_swap_verdaux_in(bfd *, const Elf_External_Verdaux *, Elf_Internal_Verdaux *)
void bfd_elf32_swap_symbol_out(bfd *, const Elf_Internal_Sym *, void *, void *)
bfd_boolean _bfd_elf_is_local_label_name(bfd *, const char *)
int _bfd_elf_symbol_from_bfd_symbol(bfd *, asymbol **)
bfd_boolean _bfd_elf_slurp_version_tables(bfd *, bfd_boolean)
bfd_vma _bfd_elf_section_offset(bfd *, struct bfd_link_info *, asection *, bfd_vma)
enum elf_reloc_type_class _bfd_elf_reloc_type_class(const Elf_Internal_Rela *)
bfd_reloc_status_type _bfd_elf_rel_vtable_reloc_fn(bfd *, arelent *, struct bfd_symbol *, void *, asection *, bfd *, char **)
void _bfd_elf_swap_verneed_out(bfd *, const Elf_Internal_Verneed *, Elf_External_Verneed *)
bfd_boolean _bfd_elf_strtab_emit(bfd *, struct elf_strtab_hash *)
char * elfcore_write_pstatus(bfd *, char *, int *, long, int, const void *)
char * bfd_elf_string_from_elf_section(bfd *, unsigned, unsigned)
bfd_vma _bfd_elf_rel_local_sym(bfd *, Elf_Internal_Sym *, asection **, bfd_vma)
const bfd_target * bfd_elf64_core_file_p(bfd *)
const bfd_target * bfd_elf64_object_p(bfd *)
void _bfd_elf_get_symbol_info(bfd *, asymbol *, symbol_info *)
bfd_boolean _bfd_elf_create_dynamic_sections(bfd *, struct bfd_link_info *)
bfd_boolean bfd_elf64_checksum_contents(bfd *, void(*)(const void *, size_t, void *), void *)
long _bfd_elf_link_lookup_local_dynindx(struct bfd_link_info *, bfd *, long)
void _bfd_elf_swap_verdef_out(bfd *, const Elf_Internal_Verdef *, Elf_External_Verdef *)
void _bfd_elf_copy_obj_attributes(bfd *, bfd *)
char * elfcore_write_prpsinfo(bfd *, char *, int *, const char *, const char *)
char * bfd_elf32_core_file_failing_command(bfd *)
struct elf_segment_map * _bfd_elf_make_dynamic_segment(bfd *, asection *)
long _bfd_elf_get_symtab_upper_bound(bfd *)
long _bfd_elf_canonicalize_dynamic_symtab(bfd *, asymbol **)
bfd_size_type _bfd_elf_strtab_offset(struct elf_strtab_hash *, bfd_size_type)
bfd * _bfd_elf64_bfd_from_remote_memory(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, int(*target_read_memory)(bfd_vma, bfd_byte *, int))
bfd_boolean bfd_elf32_slurp_reloc_table(bfd *, asection *, asymbol **, bfd_boolean)
void _bfd_elf_swap_vernaux_out(bfd *, const Elf_Internal_Vernaux *, Elf_External_Vernaux *)
bfd_boolean _bfd_elf_set_section_contents(bfd *, sec_ptr, const void *, file_ptr, bfd_size_type)
asection *(* elf_gc_mark_hook_fn)(asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *)
Definition: elf-bfd.h:512
bfd_boolean bfd_elf_gc_mark_dynamic_ref_symbol(struct elf_link_hash_entry *h, void *inf)
long bfd_elf32_slurp_symbol_table(bfd *, asymbol **, bfd_boolean)
bfd_boolean _bfd_elf_write_corefile_contents(bfd *)
char * elfcore_write_prxfpreg(bfd *, char *, int *, const void *, int)
bfd_boolean bfd_elf_gc_common_final_link(bfd *, struct bfd_link_info *)
void _bfd_elf_sprintf_vma(bfd *, char *, bfd_vma)
bfd_boolean _bfd_elf_symbol_refs_local_p(struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean)
int bfd_elf64_core_file_failing_signal(bfd *)
file_ptr _bfd_elf_assign_file_position_for_section(Elf_Internal_Shdr *, file_ptr, bfd_boolean)
void _bfd_elf_init_2_index_sections(bfd *, struct bfd_link_info *)
void bfd_elf32_swap_phdr_out(bfd *, const Elf_Internal_Phdr *, Elf32_External_Phdr *)
bfd_boolean _bfd_elf_map_sections_to_segments(bfd *, struct bfd_link_info *)
struct bfd_hash_entry * _bfd_elf_link_hash_newfunc(struct bfd_hash_entry *, struct bfd_hash_table *, const char *)
const char * bfd_elf_sym_name(bfd *, Elf_Internal_Shdr *, Elf_Internal_Sym *, asection *)
bfd_boolean _bfd_elf_maybe_strip_eh_frame_hdr(struct bfd_link_info *)
void _bfd_elf_strtab_finalize(struct elf_strtab_hash *)
bfd_boolean _bfd_elf_fix_symbol_flags(struct elf_link_hash_entry *, struct elf_info_failed *)
void bfd_elf64_swap_reloca_out(bfd *, const Elf_Internal_Rela *, bfd_byte *)
void bfd_elf32_swap_reloca_in(bfd *, const bfd_byte *, Elf_Internal_Rela *)
int _bfd_elf_obj_attrs_arg_type(bfd *, int, int)
asection * _bfd_elf_gc_mark_hook(asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *)
asection * _bfd_elf_common_section(asection *)
char * elfcore_write_prstatus(bfd *, char *, int *, long, int, const void *)
char * _bfd_elf_attr_strdup(bfd *, const char *)
bfd_boolean _bfd_elf_copy_private_header_data(bfd *, bfd *)
void bfd_elf_set_group_contents(bfd *, asection *, void *)
bfd_byte _bfd_elf_encode_eh_address(bfd *abfd, struct bfd_link_info *info, asection *osec, bfd_vma offset, asection *loc_sec, bfd_vma loc_offset, bfd_vma *encoded)
irix_compat_t
Definition: elf-bfd.h:486
@ ict_irix5
Definition: elf-bfd.h:488
@ ict_irix6
Definition: elf-bfd.h:489
@ ict_none
Definition: elf-bfd.h:487
void bfd_elf32_swap_reloc_out(bfd *, const Elf_Internal_Rela *, bfd_byte *)
bfd_boolean bfd_elf32_checksum_contents(bfd *, void(*)(const void *, size_t, void *), void *)
unsigned int _bfd_elf_common_section_index(asection *)
const bfd_target * bfd_elf32_object_p(bfd *)
#define NUM_KNOWN_OBJ_ATTRIBUTES
Definition: elf-bfd.h:1184
asection * bfd_section_from_elf_index(bfd *, unsigned int)
bfd_boolean _bfd_elf_link_create_dynamic_sections(bfd *, struct bfd_link_info *)
bfd_boolean _bfd_elf_merge_sections(bfd *, struct bfd_link_info *)
bfd_boolean _bfd_elf_link_omit_section_dynsym(bfd *, struct bfd_link_info *, asection *)
bfd_boolean _bfd_elf_can_make_relative(bfd *input_bfd, struct bfd_link_info *info, asection *eh_frame_section)
bfd_boolean _bfd_elf_link_size_reloc_section(bfd *, Elf_Internal_Shdr *, asection *)
bfd_boolean _bfd_elf_link_output_relocs(bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *, struct elf_link_hash_entry **)
void bfd_elf_add_obj_attr_int(bfd *, int, int, unsigned int)
bfd_boolean bfd_elf_reloc_symbol_deleted_p(bfd_vma, void *)
bfd_boolean _bfd_elf_hash_symbol(struct elf_link_hash_entry *)
void _bfd_elf_init_1_index_section(bfd *, struct bfd_link_info *)
void _bfd_elf_swap_verneed_in(bfd *, const Elf_External_Verneed *, Elf_Internal_Verneed *)
bfd_boolean _bfd_elf_adjust_dynamic_symbol(struct elf_link_hash_entry *, void *)
bfd_boolean _bfd_elf_merge_object_attributes(bfd *, bfd *)
bfd_boolean _bfd_elf_common_definition(Elf_Internal_Sym *)
const bfd_target * bfd_elf32_core_file_p(bfd *)
void _bfd_dwarf2_cleanup_debug_info(bfd *)
void _bfd_elf_strtab_clear_all_refs(struct elf_strtab_hash *)
int _bfd_elf_section_from_bfd_section(bfd *, asection *)
void bfd_elf_set_obj_attr_contents(bfd *, bfd_byte *, bfd_vma)
void _bfd_elf_swap_vernaux_in(bfd *, const Elf_External_Vernaux *, Elf_Internal_Vernaux *)
int bfd_elf_get_obj_attr_int(bfd *, int, int)
voidpf uLong offset
Definition: ioapi.h:144
voidpf void * buf
Definition: ioapi.h:138
#define ATTRIBUTE_UNUSED
Definition: ansidecl.h:288
int type
Definition: mipsasm.c:17
unsigned char bfd_byte
Definition: mybfd.h:176
BFD_HOST_64_BIT bfd_signed_vma
Definition: mybfd.h:112
BFD_HOST_U_64_BIT bfd_size_type
Definition: mybfd.h:113
enum bfd_reloc_status bfd_reloc_status_type
dynamic_lib_link_class
Definition: mybfd.h:636
BFD_HOST_U_64_BIT bfd_vma
Definition: mybfd.h:111
void(* bfd_error_plugin_type)(const char *,...)
Definition: mybfd.h:4404
int bfd_boolean
Definition: mybfd.h:98
bfd_architecture
Definition: mybfd.h:1563
BFD_HOST_64_BIT file_ptr
Definition: mybfd.h:166
unsigned BFD_HOST_64_BIT ufile_ptr
Definition: mybfd.h:167
unsigned int flagword
Definition: mybfd.h:175
enum bfd_print_symbol bfd_print_symbol_type
const char * name
Definition: op.c:541
static struct sockaddr static addrlen static backlog const void static flags void flags
Definition: sfsocketcall.h:123
static int
Definition: sfsocketcall.h:114
int size_t
Definition: sftypes.h:40
#define h(i)
Definition: sha256.c:48
Elf_Internal_Shdr * rel_hdr2
Definition: elf-bfd.h:1067
Elf_Internal_Shdr rel_hdr
Definition: elf-bfd.h:1063
Elf_Internal_Rela * relocs
Definition: elf-bfd.h:1102
union bfd_elf_section_data::@93 group
asection * sec_group
Definition: elf-bfd.h:1121
asection * next_in_group
Definition: elf-bfd.h:1125
Elf_Internal_Shdr this_hdr
Definition: elf-bfd.h:1059
unsigned int rel_count
Definition: elf-bfd.h:1070
asection * sreloc
Definition: elf-bfd.h:1109
struct elf_link_hash_entry ** rel_hashes
Definition: elf-bfd.h:1097
asection * linked_to
Definition: elf-bfd.h:1093
const char * name
Definition: elf-bfd.h:1113
struct bfd_symbol * id
Definition: elf-bfd.h:1116
unsigned int rel_count2
Definition: elf-bfd.h:1073
const char * prefix
Definition: elf-bfd.h:494
Definition: mybfd.h:361
Definition: bfdlink.h:80
Definition: mybfd.h:4212
unsigned int size
Definition: elf-bfd.h:261
unsigned int add_fde_encoding
Definition: elf-bfd.h:270
struct eh_cie_fde * cie_inf
Definition: elf-bfd.h:260
unsigned int removed
Definition: elf-bfd.h:268
unsigned int per_encoding_relative
Definition: elf-bfd.h:274
unsigned int new_offset
Definition: elf-bfd.h:263
unsigned int make_lsda_relative
Definition: elf-bfd.h:272
unsigned char lsda_offset
Definition: elf-bfd.h:266
unsigned int make_relative
Definition: elf-bfd.h:271
unsigned char lsda_encoding
Definition: elf-bfd.h:265
unsigned int offset
Definition: elf-bfd.h:262
unsigned char fde_encoding
Definition: elf-bfd.h:264
unsigned int add_augmentation_size
Definition: elf-bfd.h:269
unsigned int * set_loc
Definition: elf-bfd.h:275
unsigned int cie
Definition: elf-bfd.h:267
unsigned int need_lsda_relative
Definition: elf-bfd.h:273
bfd_vma initial_loc
Definition: elf-bfd.h:284
unsigned int fde_count
Definition: elf-bfd.h:293
unsigned int array_count
Definition: elf-bfd.h:293
bfd_boolean table
Definition: elf-bfd.h:298
asection * hdr_sec
Definition: elf-bfd.h:292
struct htab * cies
Definition: elf-bfd.h:291
struct eh_frame_array_ent * array
Definition: elf-bfd.h:294
bfd_boolean offsets_adjusted
Definition: elf-bfd.h:299
unsigned int count
Definition: elf-bfd.h:279
struct bfd_elf_version_tree * verdefs
Definition: elf-bfd.h:1164
struct bfd_link_info * info
Definition: elf-bfd.h:1162
bfd_boolean(* elf_backend_can_make_relative_eh_frame)(bfd *, struct bfd_link_info *, asection *)
Definition: elf-bfd.h:897
void(* elf_info_to_howto)(bfd *, arelent *, Elf_Internal_Rela *)
Definition: elf-bfd.h:541
bfd_boolean(* elf_backend_link_output_symbol_hook)(struct bfd_link_info *info, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *)
Definition: elf-bfd.h:632
unsigned rela_normal
Definition: elf-bfd.h:1026
bfd_boolean(* merge_symbol)(struct bfd_link_info *, struct elf_link_hash_entry **, struct elf_link_hash_entry *, Elf_Internal_Sym *, asection **, bfd_vma *, unsigned int *, bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd *, asection **, bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd *, asection **)
Definition: elf-bfd.h:942
bfd_boolean(* elf_backend_adjust_dynamic_symbol)(struct bfd_link_info *info, struct elf_link_hash_entry *h)
Definition: elf-bfd.h:686
flagword dynamic_sec_flags
Definition: elf-bfd.h:537
elf_gc_mark_hook_fn gc_mark_hook
Definition: elf-bfd.h:789
bfd_boolean(* elf_add_symbol_hook)(bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *, const char **name, flagword *flags, asection **sec, bfd_vma *value)
Definition: elf-bfd.h:627
bfd_boolean(* elf_backend_section_flags)(flagword *, const Elf_Internal_Shdr *)
Definition: elf-bfd.h:598
int(* elf_backend_relocate_section)(bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd, asection *input_section, bfd_byte *contents, Elf_Internal_Rela *relocs, Elf_Internal_Sym *local_syms, asection **local_sections)
Definition: elf-bfd.h:741
const char * obj_attrs_section
Definition: elf-bfd.h:985
bfd_boolean(* elf_backend_fake_sections)(bfd *, Elf_Internal_Shdr *, asection *)
Definition: elf-bfd.h:611
enum bfd_architecture arch
Definition: elf-bfd.h:517
bfd_boolean(* elf_hash_symbol)(struct elf_link_hash_entry *)
Definition: elf-bfd.h:957
void(* elf_backend_init_index_section)(bfd *output_bfd, struct bfd_link_info *info)
Definition: elf-bfd.h:708
const struct elf_size_info * s
Definition: elf-bfd.h:972
bfd_boolean(* elf_backend_section_from_phdr)(bfd *, Elf_Internal_Phdr *, int, const char *)
Definition: elf-bfd.h:606
unsigned int(* common_section_index)(asection *)
Definition: elf-bfd.h:936
bfd_boolean(* elf_backend_symbol_table_processing)(bfd *, elf_symbol_type *, unsigned int)
Definition: elf-bfd.h:572
bfd_boolean(* elf_backend_object_p)(bfd *)
Definition: elf-bfd.h:563
bfd_boolean(* elf_backend_write_section)(bfd *, struct bfd_link_info *, asection *, bfd_byte *)
Definition: elf-bfd.h:911
irix_compat_t(* elf_backend_mips_irix_compat)(bfd *)
Definition: elf-bfd.h:915
void(* elf_backend_final_write_processing)(bfd *, bfd_boolean linker)
Definition: elf-bfd.h:768
bfd_boolean(* gc_mark_extra_sections)(struct bfd_link_info *info, elf_gc_mark_hook_fn gc_mark_hook)
Definition: elf-bfd.h:793
int(* elf_backend_additional_program_headers)(bfd *, struct bfd_link_info *)
Definition: elf-bfd.h:773
void(* elf_backend_merge_symbol_attribute)(struct elf_link_hash_entry *, const Elf_Internal_Sym *, bfd_boolean, bfd_boolean)
Definition: elf-bfd.h:843
unsigned may_use_rel_p
Definition: elf-bfd.h:1009
void(* elf_backend_sprintf_vma)(bfd *, char *, bfd_vma)
Definition: elf-bfd.h:871
unsigned int obj_attrs_section_type
Definition: elf-bfd.h:992
bfd_boolean(* elf_backend_ignore_discarded_relocs)(asection *)
Definition: elf-bfd.h:883
bfd_boolean(* elf_backend_omit_section_dynsym)(bfd *output_bfd, struct bfd_link_info *info, asection *osec)
Definition: elf-bfd.h:647
bfd_boolean(* elf_backend_grok_prstatus)(bfd *, Elf_Internal_Note *)
Definition: elf-bfd.h:861
void(* elf_backend_hide_symbol)(struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean)
Definition: elf-bfd.h:836
bfd_vma commonpagesize
Definition: elf-bfd.h:534
unsigned default_execstack
Definition: elf-bfd.h:1051
bfd_boolean(* elf_backend_finish_dynamic_sections)(bfd *output_bfd, struct bfd_link_info *info)
Definition: elf-bfd.h:759
bfd_vma got_header_size
Definition: elf-bfd.h:979
int elf_machine_alt1
Definition: elf-bfd.h:969
unsigned sign_extend_vma
Definition: elf-bfd.h:1030
bfd_boolean(* elf_backend_grok_psinfo)(bfd *, Elf_Internal_Note *)
Definition: elf-bfd.h:865
bfd_boolean(* elf_backend_create_dynamic_sections)(bfd *abfd, struct bfd_link_info *info)
Definition: elf-bfd.h:643
bfd_boolean(* elf_backend_output_arch_syms)(bfd *, struct bfd_link_info *, void *, bfd_boolean(*)(void *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *))
Definition: elf-bfd.h:822
bfd_vma(* plt_sym_val)(bfd_vma, const asection *, const arelent *)
Definition: elf-bfd.h:930
unsigned want_got_plt
Definition: elf-bfd.h:1032
bfd_boolean(* elf_backend_sym_is_global)(bfd *, asymbol *)
Definition: elf-bfd.h:552
bfd_boolean(* elf_backend_emit_relocs)(bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *, struct elf_link_hash_entry **)
Definition: elf-bfd.h:852
const struct ecoff_debug_swap * elf_backend_ecoff_debug_swap
Definition: elf-bfd.h:921
void(* elf_info_to_howto_rel)(bfd *, arelent *, Elf_Internal_Rela *)
Definition: elf-bfd.h:545
void(* elf_backend_copy_indirect_symbol)(struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_link_hash_entry *)
Definition: elf-bfd.h:831
bfd_boolean(* check_directives)(bfd *abfd, struct bfd_link_info *info)
Definition: elf-bfd.h:666
bfd_boolean(* check_relocs)(bfd *abfd, struct bfd_link_info *info, asection *o, const Elf_Internal_Rela *relocs)
Definition: elf-bfd.h:659
int(* obj_attrs_arg_type)(int)
Definition: elf-bfd.h:989
bfd_boolean(* elf_backend_discard_info)(bfd *, struct elf_reloc_cookie *, struct bfd_link_info *)
Definition: elf-bfd.h:879
bfd_boolean(* elf_backend_section_processing)(bfd *, Elf_Internal_Shdr *)
Definition: elf-bfd.h:590
void(* elf_backend_post_process_headers)(bfd *, struct bfd_link_info *)
Definition: elf-bfd.h:804
bfd_boolean(* is_function_type)(unsigned int type)
Definition: elf-bfd.h:960
const struct bfd_elf_special_section * special_sections
Definition: elf-bfd.h:975
unsigned can_refcount
Definition: elf-bfd.h:1038
unsigned want_got_sym
Definition: elf-bfd.h:1039
unsigned want_dynbss
Definition: elf-bfd.h:1040
bfd_boolean(* gc_sweep_hook)(bfd *abfd, struct bfd_link_info *info, asection *o, const Elf_Internal_Rela *relocs)
Definition: elf-bfd.h:798
bfd_boolean(* elf_backend_finish_dynamic_symbol)(bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, Elf_Internal_Sym *sym)
Definition: elf-bfd.h:752
bfd_boolean(* elf_backend_can_make_lsda_relative_eh_frame)(bfd *, struct bfd_link_info *, asection *)
Definition: elf-bfd.h:898
unsigned plt_readonly
Definition: elf-bfd.h:1033
bfd_error_plugin_type link_order_error_handler
Definition: elf-bfd.h:963
bfd_boolean(* elf_backend_section_from_bfd_section)(bfd *, asection *, int *retval)
Definition: elf-bfd.h:617
unsigned plt_alignment
Definition: elf-bfd.h:1036
bfd_boolean(* elf_backend_fixup_symbol)(struct bfd_link_info *, struct elf_link_hash_entry *)
Definition: elf-bfd.h:840
bfd_boolean(* elf_backend_size_dynamic_sections)(bfd *output_bfd, struct bfd_link_info *info)
Definition: elf-bfd.h:704
bfd_boolean(* elf_backend_modify_program_headers)(bfd *, struct bfd_link_info *)
Definition: elf-bfd.h:781
void(* elf_backend_fprintf_vma)(bfd *, void *, bfd_vma)
Definition: elf-bfd.h:872
bfd_boolean(* elf_backend_output_arch_local_syms)(bfd *, struct bfd_link_info *, void *, bfd_boolean(*)(void *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *))
Definition: elf-bfd.h:815
bfd_byte(* elf_backend_encode_eh_address)(bfd *abfd, struct bfd_link_info *info, asection *osec, bfd_vma offset, asection *loc_sec, bfd_vma loc_offset, bfd_vma *encoded)
Definition: elf-bfd.h:904
bfd_boolean(* elf_backend_section_from_shdr)(bfd *, Elf_Internal_Shdr *, const char *, int)
Definition: elf-bfd.h:594
bfd_boolean(* elf_backend_modify_segment_map)(bfd *, struct bfd_link_info *)
Definition: elf-bfd.h:777
bfd_boolean(* gc_mark_dynamic_ref)(struct elf_link_hash_entry *h, void *inf)
Definition: elf-bfd.h:785
bfd_boolean(* as_needed_cleanup)(bfd *abfd, struct bfd_link_info *info)
Definition: elf-bfd.h:672
void(* elf_backend_begin_write_processing)(bfd *, struct bfd_link_info *)
Definition: elf-bfd.h:763
unsigned want_p_paddr_set_to_zero
Definition: elf-bfd.h:1045
unsigned want_plt_sym
Definition: elf-bfd.h:1034
void(* elf_backend_symbol_processing)(bfd *, asymbol *)
Definition: elf-bfd.h:568
bfd_boolean(* elf_backend_always_size_sections)(bfd *output_bfd, struct bfd_link_info *info)
Definition: elf-bfd.h:692
unsigned type_change_ok
Definition: elf-bfd.h:1004
unsigned may_use_rela_p
Definition: elf-bfd.h:1014
int elf_machine_code
Definition: elf-bfd.h:520
enum elf_reloc_type_class(* elf_backend_reloc_type_class)(const Elf_Internal_Rela *)
Definition: elf-bfd.h:875
unsigned default_use_rela_p
Definition: elf-bfd.h:1021
bfd_boolean(* elf_backend_ignore_undef_symbol)(struct elf_link_hash_entry *)
Definition: elf-bfd.h:848
unsigned plt_not_loaded
Definition: elf-bfd.h:1035
bfd_vma maxpagesize
Definition: elf-bfd.h:526
int(* elf_backend_get_symbol_type)(Elf_Internal_Sym *, int)
Definition: elf-bfd.h:576
unsigned can_gc_sections
Definition: elf-bfd.h:1037
unsigned int(* elf_backend_eh_frame_address_size)(bfd *, asection *)
Definition: elf-bfd.h:892
int elf_machine_alt2
Definition: elf-bfd.h:970
const char * obj_attrs_vendor
Definition: elf-bfd.h:982
bfd_vma minpagesize
Definition: elf-bfd.h:531
unsigned collect
Definition: elf-bfd.h:998
bfd_boolean(* common_definition)(Elf_Internal_Sym *)
Definition: elf-bfd.h:933
unsigned int(* elf_backend_count_relocs)(asection *, Elf_Internal_Rela *)
Definition: elf-bfd.h:857
bfd_boolean(* elf_backend_name_local_section_symbols)(bfd *)
Definition: elf-bfd.h:584
const char * relplt_name
Definition: elf-bfd.h:966
unsigned int vers
Definition: elf-bfd.h:1178
struct bfd_link_info * info
Definition: elf-bfd.h:1176
bfd_boolean failed
Definition: elf-bfd.h:1180
struct bfd_link_info * info
Definition: elf-bfd.h:1151
bfd_boolean failed
Definition: elf-bfd.h:1150
struct bfd_elf_version_tree * verdefs
Definition: elf-bfd.h:1152
Definition: elf-bfd.h:87
unsigned int non_elf
Definition: elf-bfd.h:153
long indx
Definition: elf-bfd.h:92
unsigned int pointer_equality_needed
Definition: elf-bfd.h:173
unsigned int def_regular
Definition: elf-bfd.h:139
long dynindx
Definition: elf-bfd.h:106
unsigned int other
Definition: elf-bfd.h:134
struct bfd_elf_version_tree * vertree
Definition: elf-bfd.h:199
bfd_size_type size
Definition: elf-bfd.h:128
unsigned int ref_dynamic
Definition: elf-bfd.h:141
unsigned int ref_regular_nonweak
Definition: elf-bfd.h:145
unsigned int type
Definition: elf-bfd.h:131
unsigned int non_got_ref
Definition: elf-bfd.h:164
struct elf_link_hash_entry * weakdef
Definition: elf-bfd.h:182
union elf_link_hash_entry::@90 u
unsigned int needs_plt
Definition: elf-bfd.h:151
unsigned int ref_regular
Definition: elf-bfd.h:137
unsigned long dynstr_index
Definition: elf-bfd.h:176
struct elf_link_hash_entry * parent
Definition: elf-bfd.h:212
unsigned int dynamic_adjusted
Definition: elf-bfd.h:147
unsigned long elf_hash_value
Definition: elf-bfd.h:187
bfd_boolean * used
Definition: elf-bfd.h:209
unsigned int needs_copy
Definition: elf-bfd.h:149
Elf_Internal_Verdef * verdef
Definition: elf-bfd.h:195
unsigned int dynamic_def
Definition: elf-bfd.h:168
union elf_link_hash_entry::@91 verinfo
union elf_link_hash_entry::gotplt_union got
unsigned int mark
Definition: elf-bfd.h:161
struct elf_link_hash_entry::@92 * vtable
unsigned int def_dynamic
Definition: elf-bfd.h:143
struct bfd_link_hash_entry root
Definition: elf-bfd.h:88
unsigned int hidden
Definition: elf-bfd.h:155
union gotplt_union plt
Definition: elf-bfd.h:125
unsigned int dynamic
Definition: elf-bfd.h:159
size_t size
Definition: elf-bfd.h:208
unsigned int dynamic_weak
Definition: elf-bfd.h:170
unsigned int forced_local
Definition: elf-bfd.h:157
Definition: elf-bfd.h:236
long dynindx
Definition: elf-bfd.h:246
struct elf_link_local_dynamic_entry * next
Definition: elf-bfd.h:237
Elf_Internal_Sym isym
Definition: elf-bfd.h:249
bfd * input_bfd
Definition: elf-bfd.h:240
long input_indx
Definition: elf-bfd.h:243
int num_locals
Definition: elf-bfd.h:1229
unsigned int gp_size
Definition: elf-bfd.h:1249
int num_section_syms
Definition: elf-bfd.h:1232
unsigned int stack_flags
Definition: elf-bfd.h:1320
unsigned int cverrefs
Definition: elf-bfd.h:1317
Elf_Internal_Shdr dynversym_hdr
Definition: elf-bfd.h:1239
int core_signal
Definition: elf-bfd.h:1252
asection ** local_call_stubs
Definition: elf-bfd.h:1304
Elf_Internal_Shdr symtab_shndx_hdr
Definition: elf-bfd.h:1242
Elf_Internal_Phdr * phdr
Definition: elf-bfd.h:1226
Elf_Internal_Ehdr elf_header[1]
Definition: elf-bfd.h:1224
asymbol * elf_text_symbol
Definition: elf-bfd.h:1334
void * line_info
Definition: elf-bfd.h:1286
Elf_Internal_Shdr dynstrtab_hdr
Definition: elf-bfd.h:1238
const char * dt_name
Definition: elf-bfd.h:1280
unsigned int shstrtab_section
Definition: elf-bfd.h:1243
asection ** local_stubs
Definition: elf-bfd.h:1303
asymbol ** section_syms
Definition: elf-bfd.h:1233
struct mips_elf_find_line * find_line_info
Definition: elf-bfd.h:1292
obj_attribute_list * other_obj_attributes[2]
Definition: elf-bfd.h:1361
obj_attribute known_obj_attributes[2][NUM_KNOWN_OBJ_ATTRIBUTES]
Definition: elf-bfd.h:1360
bfd_boolean flags_init
Definition: elf-bfd.h:1355
Elf_Internal_Verneed * verref
Definition: elf-bfd.h:1329
bfd_boolean bad_symtab
Definition: elf-bfd.h:1352
unsigned int symtab_section
Definition: elf-bfd.h:1243
Elf_Internal_Shdr strtab_hdr
Definition: elf-bfd.h:1236
asection * elf_data_section
Definition: elf-bfd.h:1335
file_ptr next_file_pos
Definition: elf-bfd.h:1247
Elf_Internal_Verdef * verdef
Definition: elf-bfd.h:1326
asection * elf_text_section
Definition: elf-bfd.h:1336
unsigned int num_elf_sections
Definition: elf-bfd.h:1231
struct dwarf1_debug * dwarf1_find_line_info
Definition: elf-bfd.h:1295
struct elf_link_hash_entry ** sym_hashes
Definition: elf-bfd.h:1261
asection * eh_frame_hdr
Definition: elf-bfd.h:1308
bfd_size_type program_header_size
Definition: elf-bfd.h:1283
Elf_Internal_Shdr dynsymtab_hdr
Definition: elf-bfd.h:1237
union elf_obj_tdata::@94 local_got
void * after_write_object_contents_info
Definition: elf-bfd.h:1365
bfd_signed_vma * refcounts
Definition: elf-bfd.h:1267
Elf_Internal_Shdr shstrtab_hdr
Definition: elf-bfd.h:1235
bfd_boolean relro
Definition: elf-bfd.h:1323
Elf_Internal_Shdr dynverref_hdr
Definition: elf-bfd.h:1240
unsigned int dynverref_section
Definition: elf-bfd.h:1246
unsigned int strtab_section
Definition: elf-bfd.h:1244
char * core_program
Definition: elf-bfd.h:1255
unsigned int dynverdef_section
Definition: elf-bfd.h:1246
Elf_Internal_Shdr ** group_sect_ptr
Definition: elf-bfd.h:1310
struct elf_segment_map * segment_map
Definition: elf-bfd.h:1227
unsigned int cverdefs
Definition: elf-bfd.h:1314
enum dynamic_lib_link_class dyn_lib_class
Definition: elf-bfd.h:1341
bfd_boolean linker
Definition: elf-bfd.h:1345
int num_globals
Definition: elf-bfd.h:1230
void * symbuf
Definition: elf-bfd.h:1358
int core_lwpid
Definition: elf-bfd.h:1254
struct got_entry ** ents
Definition: elf-bfd.h:1269
bfd_vma gp
Definition: elf-bfd.h:1248
void * dwarf2_find_line_info
Definition: elf-bfd.h:1298
Elf_Internal_Shdr symtab_hdr
Definition: elf-bfd.h:1234
bfd_boolean(* after_write_object_contents)(bfd *)
Definition: elf-bfd.h:1364
struct elf_strtab_hash * strtab_ptr
Definition: elf-bfd.h:1228
bfd_vma * offsets
Definition: elf-bfd.h:1268
char * core_command
Definition: elf-bfd.h:1256
Elf_Internal_Shdr ** elf_sect_ptr
Definition: elf-bfd.h:1225
unsigned int dynsymtab_section
Definition: elf-bfd.h:1244
unsigned int symtab_shndx_section
Definition: elf-bfd.h:1245
asymbol * elf_data_symbol
Definition: elf-bfd.h:1333
Elf_Internal_Shdr dynverdef_hdr
Definition: elf-bfd.h:1241
unsigned int dynversym_section
Definition: elf-bfd.h:1246
long(* slurp_symbol_table)(bfd *, asymbol **, bfd_boolean)
Definition: elf-bfd.h:440
unsigned char arch_size
Definition: elf-bfd.h:431
unsigned char log_file_align
Definition: elf-bfd.h:431
void(* swap_reloc_out)(bfd *, const Elf_Internal_Rela *, bfd_byte *)
Definition: elf-bfd.h:450
bfd_boolean(* checksum_contents)(bfd *, void(*)(const void *, size_t, void *), void *)
Definition: elf-bfd.h:435
void(* swap_dyn_in)(bfd *, const void *, Elf_Internal_Dyn *)
Definition: elf-bfd.h:441
bfd_boolean(* write_shdrs_and_ehdr)(bfd *)
Definition: elf-bfd.h:434
unsigned char sizeof_rela
Definition: elf-bfd.h:419
void(* swap_reloca_in)(bfd *, const bfd_byte *, Elf_Internal_Rela *)
Definition: elf-bfd.h:455
unsigned char sizeof_sym
Definition: elf-bfd.h:419
unsigned char ev_current
Definition: elf-bfd.h:432
unsigned char sizeof_hash_entry
Definition: elf-bfd.h:422
void(* write_relocs)(bfd *, asection *, void *)
Definition: elf-bfd.h:436
void(* swap_reloc_in)(bfd *, const bfd_byte *, Elf_Internal_Rela *)
Definition: elf-bfd.h:447
unsigned char sizeof_ehdr
Definition: elf-bfd.h:418
unsigned char sizeof_shdr
Definition: elf-bfd.h:418
void(* swap_reloca_out)(bfd *, const Elf_Internal_Rela *, bfd_byte *)
Definition: elf-bfd.h:458
unsigned char sizeof_note
Definition: elf-bfd.h:419
unsigned char sizeof_dyn
Definition: elf-bfd.h:419
void(* swap_dyn_out)(bfd *, const Elf_Internal_Dyn *, void *)
Definition: elf-bfd.h:442
void(* swap_symbol_out)(bfd *, const Elf_Internal_Sym *, void *, void *)
Definition: elf-bfd.h:438
unsigned char int_rels_per_ext_rel
Definition: elf-bfd.h:426
unsigned char sizeof_rel
Definition: elf-bfd.h:419
unsigned char elfclass
Definition: elf-bfd.h:432
int(* write_out_phdrs)(bfd *, const Elf_Internal_Phdr *, unsigned int)
Definition: elf-bfd.h:433
unsigned char sizeof_phdr
Definition: elf-bfd.h:418
bfd_boolean(* slurp_reloc_table)(bfd *, asection *, asymbol **, bfd_boolean)
Definition: elf-bfd.h:439
bfd_boolean(* swap_symbol_in)(bfd *, const void *, const void *, Elf_Internal_Sym *)
Definition: elf-bfd.h:437
void * mips_extr
Definition: elf-bfd.h:70
unsigned int hppa_arg_reloc
Definition: elf-bfd.h:69
void * any
Definition: elf-bfd.h:71
Elf_Internal_Sym internal_elf_sym
Definition: elf-bfd.h:66
unsigned short version
Definition: elf-bfd.h:77
asymbol symbol
Definition: elf-bfd.h:64
Definition: zipcmp.c:77
Definition: mybfd.h:295
obj_attribute attr
Definition: elf-bfd.h:1199
struct obj_attribute_list * next
Definition: elf-bfd.h:1197
char * s
Definition: elf-bfd.h:1193
unsigned int i
Definition: elf-bfd.h:1192
Definition: mybfd.h:1963
bfd * abfd
Definition: elf-bfd.h:410
unsigned long indx[LOCAL_SYM_CACHE_SIZE]
Definition: elf-bfd.h:411
unsigned int shndx[LOCAL_SYM_CACHE_SIZE]
Definition: elf-bfd.h:412
Definition: elf-bfd.h:117
struct plt_entry * plist
Definition: elf-bfd.h:121
struct got_entry * glist
Definition: elf-bfd.h:120
bfd_signed_vma refcount
Definition: elf-bfd.h:118
bfd_vma offset
Definition: elf-bfd.h:119
int inf(FILE *source, FILE *dest)
Definition: zpipe.c:92