+
+void
+obj_read_begin_hook (void)
+{
+}
+
+/* Handle a .compiler directive. This is intended to create the
+ compilation unit auxiliary header for MPE such that the linkeditor
+ can handle SOM extraction from archives. The format of the quoted
+ string is "sourcefile language version" and is delimited by blanks. */
+
+void
+obj_som_compiler (int unused ATTRIBUTE_UNUSED)
+{
+ char *buf;
+ char c;
+ char *filename;
+ char *language_name;
+ char *p;
+ char *version_id;
+
+ if (compiler_seen)
+ {
+ as_bad (_("Only one .compiler pseudo-op per file!"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == '\"')
+ {
+ buf = input_line_pointer;
+ ++input_line_pointer;
+ while (is_a_char (next_char_of_string ()))
+ ;
+ c = *input_line_pointer;
+ *input_line_pointer = '\000';
+ }
+ else
+ {
+ as_bad (_("Expected quoted string"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ /* Parse the quoted string into its component parts. Skip the
+ quote. */
+ filename = buf + 1;
+ p = filename;
+ while (*p != ' ' && *p != '\000')
+ p++;
+ if (*p == '\000')
+ {
+ as_bad (_(".compiler directive missing language and version"));
+ return;
+ }
+ *p = '\000';
+
+ language_name = ++p;
+ while (*p != ' ' && *p != '\000')
+ p++;
+ if (*p == '\000')
+ {
+ as_bad (_(".compiler directive missing version"));
+ return;
+ }
+ *p = '\000';
+
+ version_id = ++p;
+ while (*p != '\000')
+ p++;
+ /* Remove the trailing quote. */
+ *(--p) = '\000';
+
+ compiler_seen = 1;
+ if (! bfd_som_attach_compilation_unit (stdoutput, filename, language_name,
+ "GNU Tools", version_id))
+ {
+ bfd_perror (stdoutput->filename);
+ as_fatal (_("FATAL: Attaching compiler header %s"), stdoutput->filename);
+ }
+ *input_line_pointer = c;
+ demand_empty_rest_of_line ();
+}