LLVM 22.0.0git
llvm::SectionRef Class Reference

This is a value type class that represents a single section in the list of sections in the object file. More...

#include "llvm/Object/ObjectFile.h"

Inheritance diagram for llvm::SectionRef:
[legend]

Public Member Functions

 SectionRef ()=default
 SectionRef (DataRefImpl SectionP, const ObjectFile *Owner)
 SectionRef.
bool operator== (const SectionRef &Other) const
bool operator!= (const SectionRef &Other) const
bool operator< (const SectionRef &Other) const
void moveNext ()
Expected< StringRefgetName () const
uint64_t getAddress () const
uint64_t getIndex () const
uint64_t getSize () const
Expected< StringRefgetContents () const
Align getAlignment () const
 Get the alignment of this section.
bool isCompressed () const
bool isText () const
 Whether this section contains instructions.
bool isData () const
 Whether this section contains data, not instructions.
bool isBSS () const
 Whether this section contains BSS uninitialized data.
bool isVirtual () const
bool isBitcode () const
bool isStripped () const
bool isBerkeleyText () const
 Whether this section will be placed in the text segment, according to the Berkeley size format.
bool isBerkeleyData () const
 Whether this section will be placed in the data segment, according to the Berkeley size format.
bool isDebugSection () const
 Whether this section is a debug section.
LLVM_ABI bool containsSymbol (SymbolRef S) const
relocation_iterator relocation_begin () const
relocation_iterator relocation_end () const
iterator_range< relocation_iteratorrelocations () const
Expected< section_iteratorgetRelocatedSection () const
 Returns the related section if this section contains relocations.
DataRefImpl getRawDataRefImpl () const
const ObjectFilegetObject () const

Friends

class SymbolRef

Detailed Description

This is a value type class that represents a single section in the list of sections in the object file.

Definition at line 83 of file ObjectFile.h.

Constructor & Destructor Documentation

◆ SectionRef() [1/2]

llvm::object::SectionRef::SectionRef ( )
default

◆ SectionRef() [2/2]

llvm::object::SectionRef::SectionRef ( DataRefImpl SectionP,
const ObjectFile * Owner )
inline

SectionRef.

Definition at line 499 of file ObjectFile.h.

Member Function Documentation

◆ containsSymbol()

bool SectionRef::containsSymbol ( SymbolRef S) const

Definition at line 47 of file ObjectFile.cpp.

◆ getAddress()

uint64_t llvm::object::SectionRef::getAddress ( ) const
inline

Definition at line 526 of file ObjectFile.h.

◆ getAlignment()

Align llvm::object::SectionRef::getAlignment ( ) const
inline

Get the alignment of this section.

Definition at line 546 of file ObjectFile.h.

◆ getContents()

Expected< StringRef > llvm::object::SectionRef::getContents ( ) const
inline

Definition at line 538 of file ObjectFile.h.

◆ getIndex()

uint64_t llvm::object::SectionRef::getIndex ( ) const
inline

Definition at line 530 of file ObjectFile.h.

◆ getName()

Expected< StringRef > llvm::object::SectionRef::getName ( ) const
inline

Definition at line 522 of file ObjectFile.h.

◆ getObject()

const ObjectFile * llvm::object::SectionRef::getObject ( ) const
inline

Definition at line 607 of file ObjectFile.h.

◆ getRawDataRefImpl()

DataRefImpl llvm::object::SectionRef::getRawDataRefImpl ( ) const
inline

Definition at line 603 of file ObjectFile.h.

◆ getRelocatedSection()

Expected< section_iterator > llvm::object::SectionRef::getRelocatedSection ( ) const
inline

Returns the related section if this section contains relocations.

The returned section may or may not have applied its relocations.

Definition at line 599 of file ObjectFile.h.

◆ getSize()

uint64_t llvm::object::SectionRef::getSize ( ) const
inline

Definition at line 534 of file ObjectFile.h.

◆ isBerkeleyData()

bool llvm::object::SectionRef::isBerkeleyData ( ) const
inline

Whether this section will be placed in the data segment, according to the Berkeley size format.

This is true if the section is allocatable and contains data (e.g. PROGBITS), but is not text.

Definition at line 583 of file ObjectFile.h.

◆ isBerkeleyText()

bool llvm::object::SectionRef::isBerkeleyText ( ) const
inline

Whether this section will be placed in the text segment, according to the Berkeley size format.

This is true if the section is allocatable, and contains either code or readonly data.

Definition at line 579 of file ObjectFile.h.

◆ isBitcode()

bool llvm::object::SectionRef::isBitcode ( ) const
inline

Definition at line 571 of file ObjectFile.h.

◆ isBSS()

bool llvm::object::SectionRef::isBSS ( ) const
inline

Whether this section contains BSS uninitialized data.

Definition at line 563 of file ObjectFile.h.

◆ isCompressed()

bool llvm::object::SectionRef::isCompressed ( ) const
inline

Definition at line 551 of file ObjectFile.h.

◆ isData()

bool llvm::object::SectionRef::isData ( ) const
inline

Whether this section contains data, not instructions.

Definition at line 559 of file ObjectFile.h.

◆ isDebugSection()

bool llvm::object::SectionRef::isDebugSection ( ) const
inline

Whether this section is a debug section.

Definition at line 587 of file ObjectFile.h.

◆ isStripped()

bool llvm::object::SectionRef::isStripped ( ) const
inline

Definition at line 575 of file ObjectFile.h.

◆ isText()

bool llvm::object::SectionRef::isText ( ) const
inline

Whether this section contains instructions.

Definition at line 555 of file ObjectFile.h.

◆ isVirtual()

bool llvm::object::SectionRef::isVirtual ( ) const
inline

Definition at line 567 of file ObjectFile.h.

◆ moveNext()

void llvm::object::SectionRef::moveNext ( )
inline

Definition at line 518 of file ObjectFile.h.

◆ operator!=()

bool llvm::object::SectionRef::operator!= ( const SectionRef & Other) const
inline

Definition at line 509 of file ObjectFile.h.

◆ operator<()

bool llvm::object::SectionRef::operator< ( const SectionRef & Other) const
inline

Definition at line 513 of file ObjectFile.h.

◆ operator==()

bool llvm::object::SectionRef::operator== ( const SectionRef & Other) const
inline

Definition at line 504 of file ObjectFile.h.

◆ relocation_begin()

relocation_iterator llvm::object::SectionRef::relocation_begin ( ) const
inline

Definition at line 591 of file ObjectFile.h.

◆ relocation_end()

relocation_iterator llvm::object::SectionRef::relocation_end ( ) const
inline

Definition at line 595 of file ObjectFile.h.

◆ relocations()

iterator_range< relocation_iterator > llvm::object::SectionRef::relocations ( ) const
inline

Definition at line 135 of file ObjectFile.h.

◆ SymbolRef

friend class SymbolRef
friend

Definition at line 84 of file ObjectFile.h.


The documentation for this class was generated from the following files: