Lines Matching full:section

74 // section. As long as all the labels a section refers to are defined
76 // labels freely in that section's construction.
247 // A section is a sequence of bytes, constructed by appending bytes
253 // If you need to append a value to a section that is not convenient
255 // label's value to the section, and then set the label's value
257 // known, the section class takes care of updating all previously
260 // Once all the labels to which a section refers have had their
261 // values determined, you can get a copy of the section's contents
264 // Note that there is no specified "start of section" label. This is
266 // start of a section": the offset of the section within an object
267 // file, the address in memory at which the section's content appear,
268 // and so on. It's up to the code that uses the Section class to
270 class Section {
272 Section(Endianness endianness = kUnsetEndian)
277 virtual ~Section() { }; in ~Section()
279 // Set the default endianness of this section to ENDIANNESS. This
286 // Return the default endianness of this section.
290 // end of this section. Return a reference to this section.
291 Section &Append(const uint8_t *data, size_t size) { in Append()
295 Section &Append(const string &data) { in Append()
300 // Append SIZE copies of BYTE to the end of this section. Return a
301 // reference to this section.
302 Section &Append(size_t size, uint8_t byte) { in Append()
307 // Append NUMBER to this section. ENDIANNESS is the endianness to
309 // bytes. Return a reference to this section.
310 Section &Append(Endianness endianness, size_t size, uint64_t number);
311 Section &Append(Endianness endianness, size_t size, const Label &label);
313 // Append SECTION to the end of this section. The labels SECTION
317 // SECTION. If placing SECTION within 'this' provides new
320 Section &Append(const Section &section);
324 Section &AppendCString(const string &data) { in AppendCString()
332 Section &AppendCString(const string &data, size_t size) { in AppendCString()
339 // Append VALUE or LABEL to this section, with the given bit width and
340 // endianness. Return a reference to this section.
345 // 'D' (default, the section's default endianness)
355 Section &L8(uint8_t value) { contents_ += value; return *this; } in L8()
356 Section &B8(uint8_t value) { contents_ += value; return *this; } in B8()
357 Section &D8(uint8_t value) { contents_ += value; return *this; } in D8()
358 Section &L16(uint16_t), &L32(uint32_t), &L64(uint64_t),
361 Section &L8(const Label &label), &L16(const Label &label),
386 Section &LEB128(long long value);
402 Section &ULEB128(uint64_t value);
405 // relative to the start of the section. Fill the gap with PAD_BYTE.
407 // section.
408 Section &Align(size_t alignment, uint8_t pad_byte = 0);
410 // Clear the contents of this section.
413 // Return the current size of the section.
416 // Return a label representing the start of the section.
418 // It is up to the user whether this label represents the section's
419 // position in an object file, the section's address in memory, or
435 // item will appear in the section, relative to start().
438 // Set *LABEL to Here, and return a reference to this section.
439 Section &Mark(Label *label) { *label = Here(); return *this; } in Mark()
442 // section, set CONTENTS to the contents of this section, as a
443 // string, and clear this section. Return true on success, or false
455 // The offset of the reference within the section.
468 // The default endianness of this section.
471 // The contents of the section.
477 // A label referring to the beginning of the section.