aboutsummaryrefslogtreecommitdiff
path: root/bfd/section.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-07-31 18:45:26 +0000
committerNick Clifton <nickc@redhat.com>2000-07-31 18:45:26 +0000
commit5c440b1e3b3b9ec61ffb1cc149216603f1e2d550 (patch)
tree5d16659c9ec736a39e74d425414efdf8c2110db3 /bfd/section.c
parent34e9d9bbe19dddb89155f7e22271d50ff2b0d597 (diff)
downloadfsf-binutils-gdb-5c440b1e3b3b9ec61ffb1cc149216603f1e2d550.zip
fsf-binutils-gdb-5c440b1e3b3b9ec61ffb1cc149216603f1e2d550.tar.gz
fsf-binutils-gdb-5c440b1e3b3b9ec61ffb1cc149216603f1e2d550.tar.bz2
Improve section to segment mapping code.
Diffstat (limited to 'bfd/section.c')
-rw-r--r--bfd/section.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/bfd/section.c b/bfd/section.c
index 9006d19..b9a39b6 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -363,6 +363,9 @@ 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. *}
+. unsigned int segment_mark : 1;
+.
. {* End of internal packed boolean fields. *}
.
. {* The virtual memory address of the section - where it will be
@@ -549,17 +552,17 @@ static const asymbol global_syms[] =
GLOBAL_SYM_INIT (BFD_IND_SECTION_NAME, &bfd_ind_section)
};
-#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
- const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \
- const asection SEC = \
+#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
+ const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \
+ const asection SEC = \
/* name, id, index, next, flags, user_set_vma, reloc_done, */ \
{ NAME, IDX, 0, NULL, FLAGS, 0, 0, \
\
- /* linker_mark, gc_mark, vma, lma, _cooked_size, _raw_size, */ \
- 0, 0, 0, 0, 0, 0, \
+ /* linker_mark, gc_mark, segment_mark, vma, lma, _cooked_size, */ \
+ 0, 0, 0, 0, 0, 0, \
\
- /* output_offset, output_section, alignment_power, */ \
- 0, (struct sec *) &SEC, 0, \
+ /* _raw_size, output_offset, output_section, alignment_power, */ \
+ 0, 0, (struct sec *) &SEC, 0, \
\
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
NULL, NULL, 0, 0, 0, \