Display the reference causing a shared library to be needed

Adds a section for --as-needed libraries to a linker map file, similar
to what we do for archive libraries.

bfd/
	* elflink.c (elf_link_add_object_symbols): Call minfo for --as-needed.
ld/
	* ldlang.c (asneeded_list_head, asneeded_list_tail): New vars.
	(lang_init): Initialise them.
	(lang_print_asneeded): New function.
	(lang_process): Call lang_print_asneeded.
	* ldlang.h (struct asneeded_minfo): New.
	(asneeded_list_tail): Declare.
	* ldmain.c (add_archive_element): Improve archive map heading.
	* ldmisc.c (minfo): Stash --as-needed info.
This commit is contained in:
Alan Modra 2014-01-22 16:05:12 +10:30
parent cda796e168
commit 16e4ecc0db
7 changed files with 89 additions and 2 deletions

View file

@ -841,7 +841,8 @@ add_archive_element (struct bfd_link_info *info,
{
char buf[100];
sprintf (buf, _("Archive member included because of file (symbol)\n\n"));
sprintf (buf, _("Archive member included "
"to satisfy reference by file (symbol)\n\n"));
minfo ("%s", buf);
header_printed = TRUE;
}