* 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.
|
||
|---|---|---|
| .. | ||
| .Sanitize | ||
| a29k.sc | ||
| aix.sc | ||
| alpha.sc | ||
| aout.sc | ||
| armaout.sc | ||
| armcoff.sc | ||
| delta68.sc | ||
| ebmon29k.sc | ||
| elf.sc | ||
| elfd10v.sc | ||
| elfd30v.sc | ||
| elfppc.sc | ||
| go32coff.sc | ||
| h8300.sc | ||
| h8300h.sc | ||
| h8300s.sc | ||
| h8500.sc | ||
| h8500b.sc | ||
| h8500c.sc | ||
| h8500m.sc | ||
| h8500s.sc | ||
| hppaelf.sc | ||
| i386coff.sc | ||
| i386go32.sc | ||
| i386lynx.sc | ||
| i386msdos.sc | ||
| i960.sc | ||
| m68kaux.sc | ||
| m68kcoff.sc | ||
| m68klynx.sc | ||
| m88kbcs.sc | ||
| mips.sc | ||
| mipsbsd.sc | ||
| nw.sc | ||
| pe.sc | ||
| ppcpe.sc | ||
| psos.sc | ||
| README | ||
| riscix.sc | ||
| sa29200.sc | ||
| sh.sc | ||
| sparccoff.sc | ||
| sparclynx.sc | ||
| st2000.sc | ||
| tic30aout.sc | ||
| tic30coff.sc | ||
| tic80coff.sc | ||
| v850.sc | ||
| vanilla.sc | ||
| w65.sc | ||
| z8000.sc | ||
The files in this directory are linker script templates.
genscripts.sh sets some shell variables, then sources
EMULATION.sc, to generate EMULATION.{x,xr,xu,xn,xbn} -- the script
files for default, -r, -Ur, -n, -N.