mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
* ld.h (check_nocrossrefs): Declare.
* ldlang.h (struct lang_nocrossref): Define. (struct lang_nocrossrefs): Define. (nocrossref_list): Declare. (lang_add_nocrossref): Declare. * ldlex.l: Recognize NOCROSSREFS keyword. * ldgram.y (%union): Add nocrossref field. (NOCROSSREFS): New terminal. (ifile_p1): Recognize NOCROSSREFS. (nocrossref_list): New nonterminal. * ldlang.c (nocrossref_list): Define. (lang_add_nocrossref): New function. * ldmain.c (main): If nocrossref_list is not NULL, call check_nocrossrefs. (warning_callback): Free symbols if there is no place to store them. (notice): Call add_cref if nocrossref_list is not NULL. * ldcref.c: Include "ldexp.h" and "ldlang.h". (check_nocrossrefs): New function. (check_nocrossref): New static function. (struct check_refs_info): Define. (check_refs, check_reloc_refs): New static functions. * Makefile.in: Rebuild dependencies. * ld.texinfo (Option Commands): Document NOCROSSREFS.
This commit is contained in:
@@ -323,6 +323,8 @@ main (argc, argv)
|
||||
lang_map ();
|
||||
if (command_line.cref)
|
||||
output_cref (config.map_file != NULL ? config.map_file : stdout);
|
||||
if (nocrossref_list != NULL)
|
||||
check_nocrossrefs ();
|
||||
|
||||
/* Even if we're producing relocateable output, some non-fatal errors should
|
||||
be reported in the exit status. (What non-fatal errors, if any, do we
|
||||
@@ -1031,6 +1033,9 @@ warning_callback (info, warning, symbol, abfd, section, address)
|
||||
|
||||
if (! info.found)
|
||||
einfo ("%B: %s\n", abfd, warning);
|
||||
|
||||
if (entry == NULL)
|
||||
free (asymbols);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1241,7 +1246,7 @@ notice (info, name, abfd, section, value)
|
||||
bfd_is_und_section (section) ? "reference to" : "definition of",
|
||||
name);
|
||||
|
||||
if (command_line.cref)
|
||||
if (command_line.cref || nocrossref_list != NULL)
|
||||
add_cref (name, abfd, section, value);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user