aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1998-07-02 02:52:31 +0000
committerRichard Henderson <rth@redhat.com>1998-07-02 02:52:31 +0000
commit71b012a810fd03d0aa05cd6d0fc874abdafdfc61 (patch)
tree9e7f3f420f28a3b345bc89fffde1b161c9a2df56 /ld/ld.h
parent5ea0771f4ca8d8c43f3379dc70e4071325e7d68c (diff)
downloadgdb-71b012a810fd03d0aa05cd6d0fc874abdafdfc61.zip
gdb-71b012a810fd03d0aa05cd6d0fc874abdafdfc61.tar.gz
gdb-71b012a810fd03d0aa05cd6d0fc874abdafdfc61.tar.bz2
* ld.h (args_type): Add gc_sections.
* ldgram.y (ldgram_had_keep, KEEP): New. (input_section_spec_no_keep): Rename from old input_section_spec. (input_section_spec): New. Recognize KEEP. * ldlang.c (wild_section): Handle keep sections. (lang_gc_wild_section, lang_gc_wild_file, lang_gc_wild): New. (lang_gc_sections_1, lang_gc_sections): New. (lang_process): Invoke lang_gc_sections. (lang_add_wild): Add keep argument. Update all callers. * ldlang.h (lang_wild_statement_struct): Add keep_sections. * ldlex.l (KEEP): Match it. * ldmain.c (main): Error on -r and --gc-sections. * lexsup.c: Add --gc-sections. * scripttempl/elf.sc: Merge .text.* etc sections appropriately. Mark startup sections with KEEP. * scripttempl/elfppc.sc: Likewise. * ld.texinfo: Update for --gc-sections and KEEP.
Diffstat (limited to 'ld/ld.h')
-rw-r--r--ld/ld.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ld/ld.h b/ld/ld.h
index c6ee15f..d92b148 100644
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -138,6 +138,9 @@ typedef struct
/* Name of shared object for whose symbol table this shared object
is an auxiliary filter. From the --auxiliary option. */
char **auxiliary_filters;
+
+ /* Remove unreferenced sections? */
+ boolean gc_sections;
} args_type;
extern args_type command_line;
@@ -153,6 +156,12 @@ typedef struct
/* If true, doing a dynamic link. */
boolean dynamic_link;
+ /* If true, -shared is supported. */
+ /* ??? A better way to do this is perhaps to define this in the
+ ld_emulation_xfer_struct since this is really a target dependent
+ parameter. */
+ boolean has_shared;
+
/* If true, build constructors. */
boolean build_constructors;