* merge.h (Output_merge_string::Merged_string): Remove object, shndx,
[binutils-gdb.git] / gold / script-c.h
index 3da634f79fd00beaca469b20a4b9e41e2a64d790..29901e3c3a8c77887b4bf44de1096980379a8a70 100644 (file)
@@ -61,6 +61,18 @@ typedef Expression* Expression_ptr;
 typedef void* Expression_ptr;
 #endif
 
+/* Script_section type.  */
+enum Script_section_type
+{
+  /* No section type.  */
+  SCRIPT_SECTION_TYPE_NONE,
+  SCRIPT_SECTION_TYPE_NOLOAD,
+  SCRIPT_SECTION_TYPE_DSECT,
+  SCRIPT_SECTION_TYPE_COPY,
+  SCRIPT_SECTION_TYPE_INFO,
+  SCRIPT_SECTION_TYPE_OVERLAY
+};
+
 /* A constraint for whether to use a particular output section
    definition.  */
 
@@ -83,6 +95,8 @@ struct Parser_output_section_header
 {
   /* The address.  This may be NULL.  */
   Expression_ptr address;
+  /* Section type.  May be NULL string.  */ 
+  enum Script_section_type section_type;
   /* The load address, from the AT specifier.  This may be NULL.  */
   Expression_ptr load_address;
   /* The alignment, from the ALIGN specifier.  This may be NULL.  */
@@ -222,6 +236,11 @@ script_add_extern(void* closure, const char*, size_t);
 extern void
 script_add_file(void* closure, const char*, size_t);
 
+/* Called by the bison parser to add a library to the link.  */
+
+extern void
+script_add_library(void* closure, const char*, size_t);
+
 /* Called by the bison parser to start and stop a group.  */
 
 extern void
@@ -258,6 +277,10 @@ extern int
 script_check_output_format(void* closure, const char*, size_t,
                           const char*, size_t, const char*, size_t);
 
+/* Called by the bison parser to handle TARGET.  */
+extern void
+script_set_target(void* closure, const char*, size_t);
+
 /* Called by the bison parser to handle SEARCH_DIR.  */
 
 extern void
@@ -385,6 +408,11 @@ script_data_segment_align(void* closure);
 extern void
 script_data_segment_relro_end(void* closure);
 
+/* Record the fact that a SEGMENT_START expression is seen.  */
+
+extern void
+script_saw_segment_start_expression(void* closure);
+
 /* Called by the bison parser for expressions.  */
 
 extern Expression_ptr