fab4a87f1b
2007-02-14 H.J. Lu <hongjiu.lu@intel.com> PR ld/3953 * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol when adding default symbol. ld/testsuite/ 2007-02-14 H.J. Lu <hongjiu.lu@intel.com> PR ld/3953 * ld-elf/beginwarn.c: New file. * ld-elf/warn.out: Likewise. * ld-elf/shared.exp (build_tests): Add "Build warn libbar.so". (run_tests): Add "Run warn with versioned libfoo.so". * lib/ld-lib.exp (default_ld_relocate): Make exec_output global and remove target first. (default_ld_link): Likewise. (default_ld_simple_link): Likewise. (run_ld_link_exec_tests): Take an optional linker warning and check it. (default_ld_link): Check pruned linker output.
9 lines
294 B
C
9 lines
294 B
C
static const char _evoke_link_warning_foo []
|
|
__attribute__ ((used, section (".gnu.warning.foo")))
|
|
= "function foo is deprecated";
|
|
|
|
extern void foo (void);
|
|
|
|
static void (*const init_array []) (void)
|
|
__attribute__ ((used, section (".init_array"), aligned (sizeof (void *))))
|
|
= { foo };
|