aboutsummaryrefslogtreecommitdiff
path: root/bfd/section.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-10-09 06:05:17 +0000
committerAlan Modra <amodra@gmail.com>2001-10-09 06:05:17 +0000
commitdbb410c3e20602a6d4be32a6833a9b7f5b0f1ae9 (patch)
tree235b9a47bbaa9e8704d51a4d32cd09ad5b2cfa74 /bfd/section.c
parentddb26835359dd46ef225f8e8bb475f68db3ac452 (diff)
downloadgdb-dbb410c3e20602a6d4be32a6833a9b7f5b0f1ae9.zip
gdb-dbb410c3e20602a6d4be32a6833a9b7f5b0f1ae9.tar.gz
gdb-dbb410c3e20602a6d4be32a6833a9b7f5b0f1ae9.tar.bz2
* elf-bfd.h (struct bfd_elf_section_data): Add "group" and
"next_in_group". Fix gp and gp_size comments. * elf.c (union elf_internal_group): New. (setup_group): New function. (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP. Call setup_group for SHF_GROUP sections. (bfd_section_from_shdr): Build a BFD section for SHT_GROUP. (elf_fake_sections): Set header type for SEC_GROUP, and header flags for sections in a group. (set_group_contents): New function. (_bfd_elf_compute_section_file_positions): Call it. (assign_section_numbers): Set sh_link for SHT_GROUP. * elflink.h (gc_mark_hook): Handle section groups. * elfxx-target.h: Add SEC_GROUP to applicable_flags. * section.c (SEC_GROUP): Define. (struct sec): Comment fixes. * bfd-in2.h: Regenerate. * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression out of function args. (_bfd_elf_canonicalize_reloc): Similarly. (_bfd_elf_get_symtab): Here too. (_bfd_elf_canonicalize_dynamic_symtab): And here. * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for bfd_bread, and remove unnecessary cast.
Diffstat (limited to 'bfd/section.c')
-rw-r--r--bfd/section.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/bfd/section.c b/bfd/section.c
index f3bd381..702f05a 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -177,7 +177,7 @@ CODE_FRAGMENT
.
. int id;
.
-. {* Which section is it; 0..nth. *}
+. {* Which section in the bfd; 0..n-1 as sections are created in a bfd. *}
.
. int index;
.
@@ -292,9 +292,10 @@ CODE_FRAGMENT
. objects are to be further relocated. *}
.#define SEC_EXCLUDE 0x40000
.
-. {* The contents of this section are to be sorted by the
-. based on the address specified in the associated symbol
-. table. *}
+. {* The contents of this section are to be sorted based on the sum of
+. the symbol and addend values specified by the associated relocation
+. entries. Entries without associated relocation entries will be
+. appended to the end of the section in an unspecified order. *}
.#define SEC_SORT_ENTRIES 0x80000
.
. {* When linking, duplicate sections of the same name should be
@@ -361,6 +362,9 @@ CODE_FRAGMENT
. size entries. *}
.#define SEC_STRINGS 0x40000000
.
+. {* This section contains data about section groups. *}
+.#define SEC_GROUP 0x80000000
+.
. {* End of section flags. *}
.
. {* Some internal packed boolean fields. *}
@@ -381,7 +385,8 @@ CODE_FRAGMENT
. {* A mark flag used by some linker backends for garbage collection. *}
. unsigned int gc_mark : 1;
.
-. {* Used by the ELF code to mark sections which have been allocated to segments. *}
+. {* Used by the ELF code to mark sections which have been allocated
+. to segments. *}
. unsigned int segment_mark : 1;
.
. {* End of internal packed boolean fields. *}