+ std::map<Section_id, unsigned int>*
+ get_section_order_map()
+ { return &this->section_order_map_; }
+
+ // Struct to store segment info when mapping some input sections to
+ // unique segments using linker plugins. Mapping an input section to
+ // a unique segment is done by first placing such input sections in
+ // unique output sections and then mapping the output section to a
+ // unique segment. NAME is the name of the output section. FLAGS
+ // and ALIGN are the extra flags and alignment of the segment.
+ struct Unique_segment_info
+ {
+ // Identifier for the segment. ELF segments dont have names. This
+ // is used as the name of the output section mapped to the segment.
+ const char* name;
+ // Additional segment flags.
+ uint64_t flags;
+ // Segment alignment.
+ uint64_t align;
+ };
+
+ // Mapping from input section to segment.
+ typedef std::map<Const_section_id, Unique_segment_info*>
+ Section_segment_map;
+
+ // Maps section SECN to SEGMENT s.
+ void
+ insert_section_segment_map(Const_section_id secn, Unique_segment_info *s);
+
+ // By default, gold groups input sections with certain prefixes. This
+ // function returns true if this section name NAME contains such a prefix.
+ bool
+ is_section_name_prefix_grouped(const char *name);
+