+
+ lang_for_each_file (check_section_sym_xref);
+}
+
+/* Checks for prohibited cross references to section symbols. */
+
+static void
+check_section_sym_xref (statement)
+ lang_input_statement_type *statement;
+{
+ bfd *abfd;
+ asection *sec;
+
+ abfd = statement->the_bfd;
+ if (abfd == NULL)
+ return;
+
+ for (sec = abfd->sections; sec != NULL; sec = sec->next)
+ {
+ asection *outsec;
+
+ outsec = sec->output_section;
+ if (outsec != NULL)
+ {
+ const char *outsecname;
+ struct lang_nocrossrefs *ncrs;
+ struct lang_nocrossref *ncr;
+
+ outsecname = outsec->name;
+ for (ncrs = nocrossref_list; ncrs != NULL; ncrs = ncrs->next)
+ for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next)
+ if (strcmp (ncr->name, outsecname) == 0)
+ check_refs (NULL, sec, abfd, ncrs);
+ }
+ }