aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-08-01 17:35:49 +0000
committerIan Lance Taylor <ian@airs.com>1996-08-01 17:35:49 +0000
commit582dd77f6571a3b9ca89d715d1522b68b2507feb (patch)
tree270378b4c50fe9c9e7c1b48dcbeb9cf7882213a7 /ld/ld.texinfo
parent8efb80797cacf61ac0857cb9b149cac079356a3b (diff)
downloadgdb-582dd77f6571a3b9ca89d715d1522b68b2507feb.zip
gdb-582dd77f6571a3b9ca89d715d1522b68b2507feb.tar.gz
gdb-582dd77f6571a3b9ca89d715d1522b68b2507feb.tar.bz2
* 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.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo18
1 files changed, 18 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 1034b1e..99450f6 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -2704,6 +2704,24 @@ the environment variable @code{GNUTARGET}, if available, to select the
output file format. If that variable is also absent, @code{ld} uses
the default format configured for your machine in the BFD libraries.
@end ifclear
+
+@cindex cross references
+@kindex NOCROSSREFS ( @var{sections} )
+@item NOCROSSREFS ( @var{section} @var{section} @dots{} )
+This command may be used to tell @code{ld} to issue an error about any
+references among certain sections.
+
+In certain types of programs, particularly on embedded systems, when one
+section is loaded into memory, another section will not be. Any direct
+references between the two sections would be errors. For example, it
+would be an error if code in one section called a function defined in
+the other section.
+
+The @code{NOCROSSREFS} command takes a list of section names. If
+@code{ld} detects any cross references between the sections, it reports
+an error and returns a non-zero exit status. The @code{NOCROSSREFS}
+command uses output section names, defined in the @code{SECTIONS}
+command. It does not use the names of input sections.
@end table
@ifset GENERIC