From 073811d89c98d6e1c078a032ca2eedefebf80384 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 29 Jul 2025 15:30:32 +0100 Subject: feat: link & c++: code quality improvements and linker tweaks. Signed-off-by: Amlal El Mahrouss --- dev/LibCompiler/src/Linker/DynamicLinker64PEF.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'dev/LibCompiler/src/Linker/DynamicLinker64PEF.cc') diff --git a/dev/LibCompiler/src/Linker/DynamicLinker64PEF.cc b/dev/LibCompiler/src/Linker/DynamicLinker64PEF.cc index 47ff9e5..698cf61 100644 --- a/dev/LibCompiler/src/Linker/DynamicLinker64PEF.cc +++ b/dev/LibCompiler/src/Linker/DynamicLinker64PEF.cc @@ -262,21 +262,21 @@ LIBCOMPILER_MODULE(DynamicLinker64PEF) { archs |= hdr.fArch; std::size_t cnt = hdr.fCount; - if (kVerbose) kConsoleOut << "Object header found, record count: " << cnt << "\n"; + if (kVerbose) kConsoleOut << "header found, record count: " << cnt << "\n"; pef_container.Count = cnt; char_type* raw_ae_records = new char_type[cnt * sizeof(LibCompiler::AERecordHeader)]; if (!raw_ae_records) { - if (kVerbose) kConsoleOut << "Allocation failure for records of count: " << cnt << "\n"; + if (kVerbose) kConsoleOut << "allocation failed for records of count: " << cnt << "\n"; } - memset(raw_ae_records, 0, cnt * sizeof(LibCompiler::AERecordHeader)); + std::memset(raw_ae_records, 0, cnt * sizeof(LibCompiler::AERecordHeader)); auto* ae_records = reader_protocol.Read(raw_ae_records, cnt); - auto org = kLinkerDefaultOrigin; + size_t org = kLinkerDefaultOrigin; for (size_t ae_record_index = 0; ae_record_index < cnt; ++ae_record_index) { LibCompiler::PEFCommandHeader command_header{0}; @@ -342,7 +342,7 @@ LIBCOMPILER_MODULE(DynamicLinker64PEF) { continue; } - kConsoleOut << "Not an AE container: " << objectFile << std::endl; + kConsoleOut << "not an object container: " << objectFile << std::endl; // don't continue, it is a fatal error. return LIBCOMPILER_EXEC_ERROR; @@ -353,7 +353,7 @@ LIBCOMPILER_MODULE(DynamicLinker64PEF) { output_fc << pef_container; if (kVerbose) { - kConsoleOut << "Wrote container to: " << output_fc.tellp() << ".\n"; + kConsoleOut << "wrote container to: " << output_fc.tellp() << ".\n"; } output_fc.seekp(std::streamsize(pef_container.HdrSz)); -- cgit v1.2.3