aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-06-07 14:57:11 +0000
committerAlan Modra <amodra@gmail.com>2002-06-07 14:57:11 +0000
commit1126897b369207e6242a9e0f5bbee00c10831ded (patch)
treea51cb804cd3ea7de2b31e0884486922384336f4e /bfd/elf-bfd.h
parente0076ab3140185bf116c79564b976d455942a984 (diff)
downloadgdb-1126897b369207e6242a9e0f5bbee00c10831ded.zip
gdb-1126897b369207e6242a9e0f5bbee00c10831ded.tar.gz
gdb-1126897b369207e6242a9e0f5bbee00c10831ded.tar.bz2
* elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
"group" union. (elf_group_name): Update. (elf_group_id): Define. (bfd_elf_set_group_contents): Declare. * elf.c (elf_fake_sections): Qualify use of elf_group_name. (set_group_contents): Rename to bfd_elf_set_group_contents. Remove ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use that sym for the signature. (_bfd_elf_compute_section_file_positions): Don't call set_group_contents for "ld -r" case. (swap_out_syms): Use bfd_zalloc. * elflink.h (elf_link_add_archive_symbols): Likewise. (NAME(bfd_elf,size_dynamic_sections)): Likewise. (elf_bfd_final_link): Call bfd_elf_set_group_contents.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 238a6d6..28dbe83 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -916,8 +916,13 @@ struct bfd_elf_section_data
/* Type of that information. */
enum elf_link_info_type sec_info_type;
- /* Group name, if this section is part of a group. */
- const char *group_name;
+ union {
+ /* Group name, if this section is a member of a group. */
+ const char *name;
+
+ /* Group signature sym, if this is the SHT_GROUP section. */
+ struct symbol_cache_entry *id;
+ } group;
/* A linked list of sections in the group. Circular when used by
the linker. */
@@ -934,7 +939,8 @@ struct bfd_elf_section_data
};
#define elf_section_data(sec) ((struct bfd_elf_section_data*)sec->used_by_bfd)
-#define elf_group_name(sec) (elf_section_data(sec)->group_name)
+#define elf_group_name(sec) (elf_section_data(sec)->group.name)
+#define elf_group_id(sec) (elf_section_data(sec)->group.id)
#define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
#define elf_linkonce_p(sec) (elf_section_data(sec)->linkonce_p)
@@ -1265,6 +1271,8 @@ extern boolean _bfd_elf_merge_sections
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_elf_discard_group
PARAMS ((bfd *, struct sec *));
+extern void bfd_elf_set_group_contents
+ PARAMS ((bfd *, asection *, PTR));
extern void _bfd_elf_link_just_syms
PARAMS ((asection *, struct bfd_link_info *));
extern boolean _bfd_elf_copy_private_symbol_data