[llvm] [llvm-objcopy] Support SREC output format (PR #75874)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 29 17:51:04 PST 2024
================
@@ -2847,24 +2847,24 @@ void SRECSectionWriter::writeRecord(SRecord &Record, uint64_t Off) {
memcpy(Out.getBufferStart() + Off, Data.data(), Data.size());
}
-void SRECSectionWriter::writeRecords(uint32_t Entry) {
+void SRECSizeCalculator::writeRecords(uint32_t Entry) {
+ // The ELF header could contain an entry point outside of the sections we have
+ // seen that does not fit the current record Type.
Type = std::max(Type, SRecord::getType(Entry));
uint64_t Off = HeaderSize;
for (SRecord &Record : Records) {
Record.Type = Type;
- writeRecord(Record, Off);
Off += Record.getSize();
}
Offset = Off;
}
-void SRECSectionWriterBase::writeRecords(uint32_t Entry) {
- // The ELF header could contain an entry point outside of the sections we have
- // seen that does not fit the current record Type.
+void SRECSectionWriter::writeRecords(uint32_t Entry) {
Type = std::max(Type, SRecord::getType(Entry));
----------------
quic-areg wrote:
Done
https://github.com/llvm/llvm-project/pull/75874
More information about the llvm-commits
mailing list