summaryrefslogtreecommitdiff
path: root/bfd/section.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-06-29 14:05:21 +0000
committerAlan Modra <amodra@bigpond.net.au>2005-06-29 14:05:21 +0000
commitaa41f205f662404dfed3e6476155df20be77b1b0 (patch)
tree83b96015ea20e88a9b7ec9b8f99d92ef164baf7d /bfd/section.c
parentf996f766758ba96c9fd0e5310eb340c1a2ffcc31 (diff)
downloadgdb-aa41f205f662404dfed3e6476155df20be77b1b0.tar.gz
* elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
.eh_frame specially.. (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame. Don't recheck sections we have already marked. (elf_gc_sweep): Keep non-code sections referenced from .eh_frame. * section.c (struct bfd_section): Add gc_mark_from_eh. (STD_SECTION): Adjust. * ecoff.c (bfd_debug_section): Adjust. * bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/section.c')
-rw-r--r--bfd/section.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/bfd/section.c b/bfd/section.c
index 75acad7752b..aeb63a67425 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -354,8 +354,9 @@ CODE_FRAGMENT
. output sections that have an input section. *}
. unsigned int linker_has_input : 1;
.
-. {* A mark flag used by some linker backends for garbage collection. *}
+. {* Mark flags used by some linker backends for garbage collection. *}
. unsigned int gc_mark : 1;
+. unsigned int gc_mark_from_eh : 1;
.
. {* The following flags are used by the ELF linker. *}
.
@@ -661,18 +662,18 @@ static const asymbol global_syms[] =
#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \
- asection SEC = \
+ asection SEC = \
/* name, id, index, next, prev, flags, user_set_vma, */ \
{ NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
\
- /* linker_mark, linker_has_input, gc_mark, segment_mark, */ \
+ /* linker_mark, linker_has_input, gc_mark, gc_mark_from_eh, */ \
0, 0, 1, 0, \
\
- /* sec_info_type, use_rela_p, has_tls_reloc, has_gp_reloc, */ \
- 0, 0, 0, 0, \
+ /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ \
+ 0, 0, 0, 0, \
\
- /* need_finalize_relax, reloc_done, */ \
- 0, 0, \
+ /* has_gp_reloc, need_finalize_relax, reloc_done, */ \
+ 0, 0, 0, \
\
/* vma, lma, size, rawsize */ \
0, 0, 0, 0, \
@@ -686,8 +687,8 @@ static const asymbol global_syms[] =
/* line_filepos, userdata, contents, lineno, lineno_count, */ \
0, NULL, NULL, NULL, 0, \
\
- /* entsize, kept_section, moving_line_filepos, */ \
- 0, NULL, 0, \
+ /* entsize, kept_section, moving_line_filepos, */ \
+ 0, NULL, 0, \
\
/* target_index, used_by_bfd, constructor_chain, owner, */ \
0, NULL, NULL, NULL, \