diff options
author | Alan Modra <amodra@gmail.com> | 2016-04-27 12:53:05 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-04-27 17:05:26 +0930 |
commit | a6a4679fc0ad12e99e0d8374752ecce9ef097ec2 (patch) | |
tree | 1cfa8a26e3fbf2382a116b96513f60a022849a0c /include/bfdlink.h | |
parent | 28cc9170c3d0bc0c5e82b45a10015e4bbcb01125 (diff) | |
download | gdb-a6a4679fc0ad12e99e0d8374752ecce9ef097ec2.zip gdb-a6a4679fc0ad12e99e0d8374752ecce9ef097ec2.tar.gz gdb-a6a4679fc0ad12e99e0d8374752ecce9ef097ec2.tar.bz2 |
Cache result of scan for __start_* and __stop_* sections
include/
* bfdlink.h (struct bfd_link_hash_entry): Add "section" field to
undef. Formatting.
bfd/
* elflink.c (_bfd_elf_is_start_stop): New function.
(_bfd_elf_gc_mark_rsec): Use it.
* elf-bfd.h (_bfd_elf_is_start_stop): Declare.
Diffstat (limited to 'include/bfdlink.h')
-rw-r--r-- | include/bfdlink.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/include/bfdlink.h b/include/bfdlink.h index 728fbe7..56ab038 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -135,21 +135,29 @@ struct bfd_link_hash_entry automatically be non-NULL since the symbol will have been on the undefined symbol list. */ struct bfd_link_hash_entry *next; - bfd *abfd; /* BFD symbol was found in. */ + /* BFD symbol was found in. */ + bfd *abfd; + /* For __start_<name> and __stop_<name> symbols, the first + input section matching the name. */ + asection *section; } undef; /* bfd_link_hash_defined, bfd_link_hash_defweak. */ struct { struct bfd_link_hash_entry *next; - asection *section; /* Symbol section. */ - bfd_vma value; /* Symbol value. */ + /* Symbol section. */ + asection *section; + /* Symbol value. */ + bfd_vma value; } def; /* bfd_link_hash_indirect, bfd_link_hash_warning. */ struct { struct bfd_link_hash_entry *next; - struct bfd_link_hash_entry *link; /* Real symbol. */ - const char *warning; /* Warning (bfd_link_hash_warning only). */ + /* Real symbol. */ + struct bfd_link_hash_entry *link; + /* Warning message (bfd_link_hash_warning only). */ + const char *warning; } i; /* bfd_link_hash_common. */ struct @@ -165,7 +173,8 @@ struct bfd_link_hash_entry the union; this structure is a major space user in the linker. */ struct bfd_link_hash_common_entry *p; - bfd_size_type size; /* Common symbol size. */ + /* Common symbol size. */ + bfd_size_type size; } c; } u; }; |