package com.oracle.objectfile.pecoff;
import java.util.EnumSet;
import com.oracle.objectfile.BasicNobitsSectionImpl;
import com.oracle.objectfile.ObjectFile.NobitsSectionImpl;
import com.oracle.objectfile.pecoff.PECoffObjectFile.PECoffSectionFlag;
public class PECoffNobitsSection extends PECoffUserDefinedSection implements NobitsSectionImpl {
public PECoffNobitsSection(PECoffObjectFile owner) {
this(owner, ".data");
}
public PECoffNobitsSection(PECoffObjectFile owner, String name) {
this(owner, name, new BasicNobitsSectionImpl(0));
}
public PECoffNobitsSection(PECoffObjectFile owner, String name, NobitsSectionImpl impl) {
this(owner, name, impl, EnumSet.of(PECoffSectionFlag.WRITE, PECoffSectionFlag.UNINITIALIZED_DATA));
}
public PECoffNobitsSection(PECoffObjectFile owner, String name, NobitsSectionImpl impl, EnumSet<PECoffSectionFlag> flags) {
this(owner, name, owner.getWordSizeInBytes(), impl, flags, -1);
}
public PECoffNobitsSection(PECoffObjectFile owner, String name, int alignment, NobitsSectionImpl impl, EnumSet<PECoffSectionFlag> flags, int shtIndex) {
super(owner, name, alignment, impl != null ? impl : new BasicNobitsSectionImpl(0), flags, shtIndex);
}
@Override
public void setSizeInMemory(long size) {
((NobitsSectionImpl) impl).setSizeInMemory(size);
}
@Override
public long getSizeInMemory() {
return ((NobitsSectionImpl) impl).getSizeInMemory();
}
}