diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-12-09 17:57:18 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-12-09 19:50:14 +0800 |
commit | 5e8c1cf25beccac1d22d10dc866912394f42771b (patch) | |
tree | ee16b70f804484dc8e434e647e699ab50da2620f /binutils-2.25/bfd/elf-bfd.h | |
parent | 8eebd7953384e6662ca926b003f2cdda8ccd3ee5 (diff) | |
download | toolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.tar.gz toolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.tar.bz2 toolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.zip |
[2.25] sync to a30720e3e633f275250e26f85ccae5dbdddfb6c6
local patches will be re-applied later
commit a30720e3e633f275250e26f85ccae5dbdddfb6c6
Author: Alan Modra <amodra@gmail.com>
Date: Wed Nov 19 10:30:16 2014 +1030
daily update
Change-Id: Ieb2a3f4dd2ecb289ac5305ff08d428b2847494ab
Diffstat (limited to 'binutils-2.25/bfd/elf-bfd.h')
-rw-r--r-- | binutils-2.25/bfd/elf-bfd.h | 67 |
1 files changed, 31 insertions, 36 deletions
diff --git a/binutils-2.25/bfd/elf-bfd.h b/binutils-2.25/bfd/elf-bfd.h index 6af1624e..0c82278b 100644 --- a/binutils-2.25/bfd/elf-bfd.h +++ b/binutils-2.25/bfd/elf-bfd.h @@ -1,5 +1,5 @@ /* BFD back-end data structures for ELF files. - Copyright 1992-2013 Free Software Foundation, Inc. + Copyright (C) 1992-2014 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -280,7 +280,9 @@ struct eh_cie_fde If REMOVED == 0, this is the CIE that we have chosen to use for the output FDE. The CIE's REMOVED field is also 0, but the CIE - might belong to a different .eh_frame input section from the FDE. */ + might belong to a different .eh_frame input section from the FDE. + + May be NULL to signify that the FDE should be discarded. */ struct eh_cie_fde *cie_inf; struct eh_cie_fde *next_for_section; } fde; @@ -372,6 +374,7 @@ struct eh_frame_sec_info struct eh_frame_array_ent { bfd_vma initial_loc; + bfd_size_type range; bfd_vma fde; }; @@ -383,10 +386,6 @@ struct eh_frame_hdr_info asection *hdr_sec; unsigned int fde_count, array_count; struct eh_frame_array_ent *array; - /* TRUE if we should try to merge CIEs between input sections. */ - bfd_boolean merge_cies; - /* TRUE if all .eh_frames have been parsd. */ - bfd_boolean parsed_eh_frames; /* TRUE if .eh_frame_hdr should contain the sorted search table. We build it if we successfully read all .eh_frame input sections and recognize them. */ @@ -419,7 +418,9 @@ enum elf_target_id MICROBLAZE_ELF_DATA, MIPS_ELF_DATA, MN10300_ELF_DATA, + NDS32_ELF_DATA, NIOS2_ELF_DATA, + OR1K_ELF_DATA, PPC32_ELF_DATA, PPC64_ELF_DATA, S390_ELF_DATA, @@ -1190,9 +1191,9 @@ struct elf_backend_data /* This function implements `bfd_elf_bfd_from_remote_memory'; see elf.c, elfcode.h. */ bfd *(*elf_backend_bfd_from_remote_memory) - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, - bfd_size_type len)); + (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, + int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, + bfd_size_type len)); /* This function is used by `_bfd_elf_get_synthetic_symtab'; see elf.c. */ @@ -1341,6 +1342,11 @@ struct elf_backend_data other file in the link needs to have a .note.GNU-stack section for a PT_GNU_STACK segment to be created. */ unsigned default_execstack : 1; + + /* True if elf_section_data(sec)->this_hdr.contents is sec->rawsize + in length rather than sec->size in length, if sec->rawsize is + non-zero and smaller than sec->size. */ + unsigned caches_rawsize : 1; }; /* Information about reloc sections associated with a bfd_elf_section_data @@ -1450,20 +1456,17 @@ struct bfd_elf_section_data /* The value of an object attribute. The type indicates whether the attribute holds and integer, a string, or both. It can also indicate that there can - be no default (i.e. all values must be written to file, even zero), and whether - it exists in bfd to begin with. */ + be no default (i.e. all values must be written to file, even zero). */ typedef struct obj_attribute { #define ATTR_TYPE_FLAG_INT_VAL (1 << 0) #define ATTR_TYPE_FLAG_STR_VAL (1 << 1) #define ATTR_TYPE_FLAG_NO_DEFAULT (1 << 2) -#define ATTR_TYPE_FLAG_EXIST (1 << 3) #define ATTR_TYPE_HAS_INT_VAL(TYPE) ((TYPE) & ATTR_TYPE_FLAG_INT_VAL) #define ATTR_TYPE_HAS_STR_VAL(TYPE) ((TYPE) & ATTR_TYPE_FLAG_STR_VAL) #define ATTR_TYPE_HAS_NO_DEFAULT(TYPE) ((TYPE) & ATTR_TYPE_FLAG_NO_DEFAULT) -#define ATTR_TYPE_EXIST(TYPE) ((TYPE) & ATTR_TYPE_FLAG_EXIST) int type; unsigned int i; @@ -1812,7 +1815,7 @@ extern struct bfd_hash_entry *_bfd_elf_link_hash_newfunc extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create (bfd *); extern void _bfd_elf_link_hash_table_free - (struct bfd_link_hash_table *); + (bfd *); extern void _bfd_elf_link_hash_copy_indirect (struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_link_hash_entry *); @@ -1895,18 +1898,10 @@ extern alent *_bfd_elf_get_lineno extern bfd_boolean _bfd_elf_set_arch_mach (bfd *, enum bfd_architecture, unsigned long); extern bfd_boolean _bfd_elf_find_nearest_line - (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, - unsigned int *); -extern bfd_boolean _bfd_elf_find_nearest_line_discriminator - (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, - unsigned int *, unsigned int *); + (bfd *, asymbol **, asection *, bfd_vma, + const char **, const char **, unsigned int *, unsigned int *); extern bfd_boolean _bfd_elf_find_line (bfd *, asymbol **, asymbol *, const char **, unsigned int *); -extern bfd_boolean _bfd_elf_find_line_discriminator - (bfd *, asymbol **, asymbol *, const char **, unsigned int *, unsigned int *); -#define _bfd_generic_find_line _bfd_elf_find_line -#define _bfd_generic_find_nearest_line_discriminator \ - _bfd_elf_find_nearest_line_discriminator extern bfd_boolean _bfd_elf_find_inliner_info (bfd *, const char **, const char **, unsigned int *); #define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols @@ -1964,13 +1959,8 @@ extern bfd_boolean _bfd_elf_strtab_emit extern void _bfd_elf_strtab_finalize (struct elf_strtab_hash *); -extern void _bfd_elf_begin_eh_frame_parsing - (struct bfd_link_info *info); extern void _bfd_elf_parse_eh_frame (bfd *, struct bfd_link_info *, asection *, struct elf_reloc_cookie *); -extern void _bfd_elf_end_eh_frame_parsing - (struct bfd_link_info *info); - extern bfd_boolean _bfd_elf_discard_section_eh_frame (bfd *, struct bfd_link_info *, asection *, bfd_boolean (*) (bfd_vma, void *), struct elf_reloc_cookie *); @@ -1993,8 +1983,6 @@ extern long _bfd_elf_link_lookup_local_dynindx (struct bfd_link_info *, bfd *, long); extern bfd_boolean _bfd_elf_compute_section_file_positions (bfd *, struct bfd_link_info *); -extern void _bfd_elf_assign_file_positions_for_relocs - (bfd *); extern file_ptr _bfd_elf_assign_file_position_for_section (Elf_Internal_Shdr *, file_ptr, bfd_boolean); @@ -2043,7 +2031,7 @@ extern bfd_reloc_status_type bfd_elf_perform_complex_relocation extern bfd_boolean _bfd_elf_setup_sections (bfd *); -extern void _bfd_elf_set_osabi (bfd * , struct bfd_link_info *); +extern void _bfd_elf_post_process_headers (bfd * , struct bfd_link_info *); extern const bfd_target *bfd_elf32_object_p (bfd *); @@ -2331,10 +2319,10 @@ extern char *elfcore_write_ppc_linux_prpsinfo32 (bfd *, char *, int *, const struct elf_internal_linux_prpsinfo *); extern bfd *_bfd_elf32_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, + (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type)); extern bfd *_bfd_elf64_bfd_from_remote_memory - (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, + (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, int (*target_read_memory) (bfd_vma, bfd_byte *, bfd_size_type)); extern bfd_vma bfd_elf_obj_attr_size (bfd *); @@ -2417,7 +2405,7 @@ extern asection _bfd_elf_large_com_section; #define RELOC_FOR_GLOBAL_SYMBOL(info, input_bfd, input_section, rel, \ r_symndx, symtab_hdr, sym_hashes, \ h, sec, relocation, \ - unresolved_reloc, warned) \ + unresolved_reloc, warned, ignored) \ do \ { \ /* It seems this can happen with erroneous or unsupported \ @@ -2427,11 +2415,17 @@ extern asection _bfd_elf_large_com_section; \ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; \ \ + if (info->wrap_hash != NULL \ + && (input_section->flags & SEC_DEBUGGING) != 0) \ + h = ((struct elf_link_hash_entry *) \ + unwrap_hash_lookup (info, input_bfd, &h->root)); \ + \ while (h->root.type == bfd_link_hash_indirect \ || h->root.type == bfd_link_hash_warning) \ h = (struct elf_link_hash_entry *) h->root.u.i.link; \ \ warned = FALSE; \ + ignored = FALSE; \ unresolved_reloc = FALSE; \ relocation = 0; \ if (h->root.type == bfd_link_hash_defined \ @@ -2454,7 +2448,7 @@ extern asection _bfd_elf_large_com_section; ; \ else if (info->unresolved_syms_in_objects == RM_IGNORE \ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) \ - ; \ + ignored = TRUE; \ else if (!info->relocatable) \ { \ bfd_boolean err; \ @@ -2470,6 +2464,7 @@ extern asection _bfd_elf_large_com_section; } \ (void) unresolved_reloc; \ (void) warned; \ + (void) ignored; \ } \ while (0) |