public Section newDebugSection(String name, ElementImpl impl) { final Segment segment = getOrCreateSegment(null, name, false, false); final int alignment = 1; // debugging information is mostly unaligned; padding can result in // corrupted data when the linker merges multiple debugging // sections from different inputs final Section result = newUserDefinedSection(segment, name, alignment, impl); return result; }
public Section newNobitsSection(String name, NobitsSectionImpl impl) { assert impl != null; final Segment segment = getOrCreateSegment(null, name, true, false); final Section result = newNobitsSection(segment, name, impl); return result; }
public Section newUserDefinedSection(String name, ElementImpl impl) { final Segment segment = getOrCreateSegment(null, name, false, false); final int alignment = getWordSizeInBytes(); final Section result = newUserDefinedSection(segment, name, alignment, impl); return result; }
public Section newProgbitsSection(String name, int alignment, boolean writable, boolean executable, ProgbitsSectionImpl impl) { assert impl != null; final Segment segment = getOrCreateSegment(null, name, writable, executable); final int adaptedAlignment = lowestCommonMultiple(alignment, getWordSizeInBytes()); final Section result = newProgbitsSection(segment, name, adaptedAlignment, writable, executable, impl); return result; }