forked from OSchip/llvm-project
COFF: Rename writeHeader -> writeHeaderTo.
Chunk has writeTo function which takes uint8_t *Buf. writeHeaderTo feels more consistent with that because this member function also takes uint8_t *Buf. llvm-svn: 239236
This commit is contained in:
parent
929d8c52b1
commit
cc608e4f35
|
@ -71,7 +71,7 @@ void OutputSection::addPermissions(uint32_t C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the section header to a given buffer.
|
// Write the section header to a given buffer.
|
||||||
void OutputSection::writeHeader(uint8_t *Buf) {
|
void OutputSection::writeHeaderTo(uint8_t *Buf) {
|
||||||
auto *Hdr = reinterpret_cast<coff_section *>(Buf);
|
auto *Hdr = reinterpret_cast<coff_section *>(Buf);
|
||||||
*Hdr = Header;
|
*Hdr = Header;
|
||||||
if (StringTableOff) {
|
if (StringTableOff) {
|
||||||
|
@ -275,7 +275,7 @@ void Writer::writeHeader() {
|
||||||
|
|
||||||
// Write section table
|
// Write section table
|
||||||
for (OutputSection *Sec : OutputSections) {
|
for (OutputSection *Sec : OutputSections) {
|
||||||
Sec->writeHeader(Buf);
|
Sec->writeHeaderTo(Buf);
|
||||||
Buf += sizeof(coff_section);
|
Buf += sizeof(coff_section);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
uint32_t getCharacteristics() { return Header.Characteristics; }
|
uint32_t getCharacteristics() { return Header.Characteristics; }
|
||||||
uint64_t getRVA() { return Header.VirtualAddress; }
|
uint64_t getRVA() { return Header.VirtualAddress; }
|
||||||
uint64_t getFileOff() { return Header.PointerToRawData; }
|
uint64_t getFileOff() { return Header.PointerToRawData; }
|
||||||
void writeHeader(uint8_t *Buf);
|
void writeHeaderTo(uint8_t *Buf);
|
||||||
|
|
||||||
// Returns the size of this section in an executable memory image.
|
// Returns the size of this section in an executable memory image.
|
||||||
// This may be smaller than the raw size (the raw size is multiple
|
// This may be smaller than the raw size (the raw size is multiple
|
||||||
|
|
Loading…
Reference in New Issue