old-cross-binutils/ld/testsuite/ld-elfvsb/sh2.c
H.J. Lu 1b1fe8feb3 bfd/
2003-04-27  H.J. Lu <hjl@gnu.org>

	* elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
	(ELF_LINK_DYNAMIC_WEAK): New.

	* elflink.h (elf_merge_symbol): Add one argument to indicate if
	a symbol should be skipped. Ignore definitions in dynamic
	objects for symbols with non-default visibility.
	(elf_add_default_symbol): Adjusted.
	(elf_link_add_object_symbols): Check if a symbol should be
	skipped. Don't merge the visibility field with the one from
	a dynamic object.
	(elf_link_check_versioned_symbol): Use undef_bfd.
	(elf_link_output_extsym): Warn if a forced local symbol is
	referenced from dynamic objects. Make non-weak undefined symbol
	with non-default visibility a fatal error.

ld/testsuite/

2003-04-27  H.J. Lu <hjl@gnu.org>

	* ld-elfvsb/elfvsb.dat: Updated.
	* ld-elfvsb/elfvsb.exp: Likewise.
	* ld-elfvsb/main.c: Likewise.
	* ld-elfvsb/sh1.c: Likewise.
	* ld-elfvsb/sh2.c: Likewise.
2003-04-28 03:31:36 +00:00

46 lines
754 B
C

/* This is part of the shared library ld test. This file becomes part
of a shared library. */
/* This variable is defined here, and referenced by another file in
the shared library. */
int shlibvar2 = 4;
/* This variable is defined here, and shouldn't be used to resolve a
reference with non-default visibility in another shared library. */
int visibility_com = 2;
/* This function is called by another file in the shared library. */
int
shlib_shlibcalled ()
{
return 5;
}
#ifdef DSO_DEFINE_TEST
int
visibility ()
{
return 2;
}
int visibility_var = 2;
int visibility_def = 2;
int
visibility_func ()
{
return 2;
}
#endif
#ifdef HIDDEN_WEAK_TEST
int visibility_var_weak = 2;
int
visibility_func_weak ()
{
return 2;
}
#endif