mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
ac69cbc672
2008-01-11 Tristan Gingold <gingold@adacore.com> Eric Botcazou <ebotcazou@adacore.com> * ldlang.c (lang_end): Warns if the entry point is not found when --gc-sections. Emit an error if no root is specified when --gc-sections -r. * ld.texinfo (Options): Document that --gc-sections is compatible with -r and -q. * ldmain.c (main): Do not error out if -r and --gc-sections. * scripttempl/elf.sc: Emit ENTRY command only if relocating. ld/testsuite: 2008-01-11 Tristan Gingold <gingold@adacore.com> * lib/ld-lib.exp (check_gc_sections_available): Now available on VxWorks. * ld-gc: New directory for testing --gc-sections. * ld-gc/gc.c: New file. * ld-gc/gc.exp: New file. * ld-gc/noent.s: New file. * ld-gc/noent.d: New file.
21 lines
187 B
C
21 lines
187 B
C
int unused_var = 7;
|
|
int used_var = 7;
|
|
|
|
int
|
|
unused_func (int v)
|
|
{
|
|
return 3 * unused_var;
|
|
}
|
|
|
|
int
|
|
used_func (int v)
|
|
{
|
|
return 2 * used_var;
|
|
}
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
return used_func (5);
|
|
}
|