bfd_symbol_reloc_link_order means to create a reloc against a section or symbol, respectively. This is used to implement -Ur to generate relocs for the constructor tables. The bfd_link_order_reloc structure describes the reloc that BFD should create. It is similar to a arelent, but I didn't use arelent because the linker does not know anything about most symbols, and any asymbol structure it creates will be partially meaningless. This information could logically be in the bfd_link_order struct, but I didn't want to waste the space since these types of relocs are relatively rare. */ struct bfd_link_order_reloc { /* Reloc type. */ bfd_reloc_code_real_type reloc; union { /* For type bfd_section_reloc_link_order, this is the section the reloc should be against. This must be a section in the output BFD, not any of the input BFDs. */ asection *section; /* For type bfd_symbol_reloc_link_order, this is the name of the symbol the reloc should be against. */ const char *name; } u; /* Addend to use. The object file should contain zero. The BFD backend is responsible for filling in the contents of the object file correctly. For some object file formats (e.g., COFF) the addend must be stored into in the object file, and for some (e.g., SPARC a.out) it is kept in the reloc. */ bfd_vma addend; }; /* Allocate a new link_order for a section. */ extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *); /* These structures are used to describe version information for the ELF linker. These structures could be manipulated entirely inside BFD, but it would be a pain. Instead, the regular linker sets up these structures, and then passes them into BFD. */ /* Glob pattern for a version. */ struct bfd_elf_version_expr { /* Next glob pattern for this version. */ struct bfd_elf_version_expr *next; /* Glob pattern. */ const char *pattern; /* Set if pattern is not a glob. */ unsigned int literal : 1; /* Defined by ".symver". */ unsigned int symver : 1; /* Defined by version script. */ unsigned int script : 1; /* Pattern type. */ #define BFD_ELF_VERSION_C_TYPE 1 #define BFD_ELF_VERSION_CXX_TYPE 2 #define BFD_ELF_VERSION_JAVA_TYPE 4 unsigned int mask : 3; }; struct bfd_elf_version_expr_head { /* List of all patterns, both wildcards and non-wildcards. */ struct bfd_elf_version_expr *list; /* Hash table for non-wildcards. */ void *htab; /* Remaining patterns. */ struct bfd_elf_version_expr *remaining; /* What kind of pattern types are present in list (bitmask). */ unsigned int mask; }; /* Version dependencies. */ struct bfd_elf_version_deps { /* Next dependency for this version. */ struct bfd_elf_version_deps *next; /* The version which this version depends upon. */ struct bfd_elf_version_tree *version_needed; }; /* A node in the version tree. */ struct bfd_elf_version_tree { /* Next version. */ struct bfd_elf_version_tree *next; /* Name of this version. */ const char *name; /* Version number. */ unsigned int vernum; /* Regular expressions for global symbols in this version. */ struct bfd_elf_version_expr_head globals; /* Regular expressions for local symbols in this version. */ struct bfd_elf_version_expr_head locals; /* List of versions which this version depends upon. */ struct bfd_elf_version_deps *deps; /* Index of the version name. This is used within BFD. */ unsigned int name_indx; /* Whether this version tree was used. This is used within BFD. */ int used; /* Matching hook. */ struct bfd_elf_version_expr *(*match) (struct bfd_elf_version_expr_head *head, struct bfd_elf_version_expr *prev, const char *sym); }; struct bfd_elf_dynamic_list { struct bfd_elf_version_expr_head head; struct bfd_elf_version_expr *(*match) (struct bfd_elf_version_expr_head *head, struct bfd_elf_version_expr *prev, const char *sym); }; #endif