* ld.h (args_type): Add gc_sections.
authorRichard Henderson <rth@redhat.com>
Thu, 2 Jul 1998 02:52:31 +0000 (02:52 +0000)
committerRichard Henderson <rth@redhat.com>
Thu, 2 Jul 1998 02:52:31 +0000 (02:52 +0000)
commit71b012a810fd03d0aa05cd6d0fc874abdafdfc61
tree9e7f3f420f28a3b345bc89fffde1b161c9a2df56
parent5ea0771f4ca8d8c43f3379dc70e4071325e7d68c
    * 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.
ld/ChangeLog
ld/ld.h
ld/ld.texinfo
ld/ldgram.y
ld/ldlang.c
ld/ldlex.l
ld/lexsup.c
ld/scripttempl/elfppc.sc