Tabnine Logo
com.oracle.objectfile
Code IndexAdd Tabnine to your IDE (free)

How to use com.oracle.objectfile

Best Java code snippets using com.oracle.objectfile (Showing top 20 results out of 315)

origin: com.oracle.substratevm/objectfile

@Override
public Set<BuildDependency> getDependencies(Map<Element, LayoutDecisionMap> decisions) {
  // we can get away with minimal dependencies, because we have no
  // content-> size dependency by default
  return ObjectFile.minimalDependencies(decisions, getElement());
}
origin: com.oracle.substratevm/objectfile

@Override
public Element getOrCreateRelocationElement(boolean useImplicitAddend) {
  // FIXME: This looks suspicious: turning an Element back into an Impl?
  return ((RelocatableSectionImpl) getElement()).getOrCreateRelocationElement(useImplicitAddend);
}
origin: com.oracle.substratevm/objectfile

@Override
public Iterable<BuildDependency> getDependencies(Map<Element, LayoutDecisionMap> decisions) {
  // we don't need a SIZE -> CONTENT dependency
  return ObjectFile.minimalDependencies(decisions, getElement());
}
origin: com.oracle.substratevm/objectfile

public static LayoutDecisionMap defaultDecisions(Element e, LayoutDecisionMap copyingIn) {
  LayoutDecisionMap decisions = new LayoutDecisionMap(e);
  decisions.putUndecided(LayoutDecision.Kind.CONTENT);
  assert !decisions.getDecision(LayoutDecision.Kind.CONTENT).isTaken();
  decisions.putUndecided(LayoutDecision.Kind.SIZE);
  decisions.putUndecided(LayoutDecision.Kind.OFFSET);
  if (e.isReferenceable()) {
    decisions.putUndecided(LayoutDecision.Kind.VADDR);
  }
  // any decisions present in copyingIn will be already "taken"
  // i.e. they're LayoutProperties
  decisions.putDecidedValues(copyingIn);
  return decisions;
}
origin: com.oracle.substratevm/objectfile

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;
}
origin: com.oracle.substratevm/objectfile

public static int defaultGetOrDecideOffset(Map<Element, LayoutDecisionMap> alreadyDecided, Element el, int offsetHint) {
  // FIXME: in this implementation, we must not have decided the vaddr already!
  // We should instead support both cases, and if the vaddr is decided, apply
  // the modulo constraint (if necessary) here!
  assert (alreadyDecided.get(el).getDecision(LayoutDecision.Kind.VADDR) == null || !alreadyDecided.get(el).getDecision(LayoutDecision.Kind.VADDR).isTaken());
  // now we are free to worry about the modulo constraint during vaddr assignment only
  // we take the hint, but bumped up to proper alignment
  return defaultGetOrDecide(alreadyDecided, el, LayoutDecision.Kind.OFFSET, nextIntegerMultiple(offsetHint, el.getAlignment()));
}
origin: com.oracle.substratevm/objectfile

@Override
public RelocationRecord markRelocationSite(int offset, int length, RelocationKind k, String symbolName, boolean useImplicitAddend, Long explicitAddend) {
  return ((RelocatableSectionImpl) getElement()).markRelocationSite(offset, length, ByteBuffer.wrap(getContent()).order(getOwner().getByteOrder()), k, symbolName, useImplicitAddend,
          explicitAddend);
}
origin: com.oracle.substratevm/objectfile

public ELFProgbitsSection(ELFObjectFile owner, String name, int alignment, ProgbitsSectionImpl impl, EnumSet<ELFSectionFlag> flags) {
  super(owner, name, alignment, ELFObjectFile.SectionType.PROGBITS, impl != null ? impl : new BasicProgbitsSectionImpl(new byte[0]), flags);
  // this *is* necessary because the newProgbitsSection helper doesn't see the impl
  if (impl == null) { // i.e. if *we* just created this.impl in the "? :" above
    this.impl.setElement(this);
  }
}
origin: com.oracle.substratevm/objectfile

public Object getDecidedValue(LayoutDecision.Kind key) {
  return getDecision(key).getValue();
}
origin: com.oracle.substratevm/objectfile

Section getSection(int sectionIndex) {
  int elementIndex = sectionIndexToElementIndex(sectionIndex);
  if (elementIndex == -1) {
    return null;
  }
  Element found = get(elementIndex);
  assert found instanceof Section;
  return (Section) found;
}
origin: com.oracle.substratevm/objectfile

@Override
public int getAlignment() {
  return getElement().getAlignment();
}
origin: com.oracle.substratevm/objectfile

@Override
public Iterable<BuildDependency> getDependencies(Map<Element, LayoutDecisionMap> decisions) {
  return ObjectFile.defaultDependencies(decisions, getElement());
}
origin: com.oracle.substratevm/objectfile

@Override
public int getAlignment() {
  return getElement().getAlignment();
}
origin: com.oracle.substratevm/objectfile

  @Override
  public MachOObjectFile getOwner() {
    return (MachOObjectFile) super.getOwner();
  }
}
origin: com.oracle.substratevm/svm

public String getFilenameSuffix() {
  if (executable) {
    return ObjectFile.getNativeFormat() == ObjectFile.Format.PECOFF ? ".exe" : "";
  }
  return "";
}
origin: com.oracle.substratevm/objectfile

@Override
public boolean removeAll(Collection<?> arg0) {
  boolean removed = false;
  for (Object o : arg0) {
    removed |= this.remove(o);
  }
  return removed;
}
origin: com.oracle.substratevm/objectfile

  @Override
  public Iterator<Iterable<String>> iterator() {
    return impl.contentProvidersIterator();
  }
};
origin: com.oracle.substratevm/objectfile

@Override
public String getFormatDependentName(Format f) {
  final String result;
  if (f == Format.MACH_O) {
    result = "__const";
  } else {
    result = super.getFormatDependentName(f);
  }
  return result;
}
origin: com.oracle.substratevm/objectfile

public PECoffProgbitsSection(PECoffObjectFile owner, String name, int alignment, ProgbitsSectionImpl impl, EnumSet<PECoffSectionFlag> flags) {
  super(owner, name, alignment, impl != null ? impl : new BasicProgbitsSectionImpl(new byte[0]), flags);
  // this *is* necessary because the newProgbitsSection helper doesn't see the impl
  if (impl == null) { // i.e. if *we* just created this.impl in the "? :" above
    this.impl.setElement(this);
  }
}
origin: com.oracle.substratevm/objectfile

public PECoffSection getSectionByIndex(int i) {
  // if this cast fails, our sectionIndexToElementIndex logic is wrong
  return (PECoffSection) elements.get(elements.sectionIndexToElementIndex(i - 1));
  // NOTE: two levels of translation here: PECoff (1-based) shndx to section index (0-based)
  // to
  // element index
}
com.oracle.objectfile

Most used classes

  • BasicProgbitsSectionImpl
    This represents the core of a progbits/regular section, in any object file format. By default it del
  • BuildDependency
    A build dependency is a pair of LayoutDecisions (a, b), such that a depends on b.
  • LayoutDecisionMap
  • ObjectFile$Element
    All headers and sections are subclasses of ObjectFile.Element. It is an inner class, meaning that ev
  • ObjectFile$ProgbitsSectionImpl
    Abstract notions of section.
  • ObjectFile,
  • SectionName,
  • SymbolTable,
  • MachOObjectFile,
  • BasicElementImpl,
  • BasicNobitsSectionImpl,
  • BuildDependency$DuplicateDependencyException,
  • ElementImpl,
  • ElementList,
  • LayoutDecision$Kind,
  • LayoutDecision,
  • ObjectFile$ElementComparatorByDecidedOffset,
  • ObjectFile$Header,
  • ObjectFile$IntegerDecisionComparator
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now