/// sections. They may not reference local symbols for addresses in
/// the group's sections, including section symbols.
/// ABI Doc : https://mentorembedded.github.io/cxx-abi/abi/prop-72-comdat.html
- /// Does the atom need to be redirected using a separate undefined atom ?
+ /// Does the atom need to be redirected using a separate undefined atom?
bool redirectReferenceUsingUndefAtom(const Elf_Sym *sourceSymbol,
const Elf_Sym *targetSymbol) const;
/// \brief the cached options relevant while reading the ELF File
bool _doStringsMerge;
- /// \brief Is --wrap on ?
+ /// \brief Is --wrap on?
bool _useWrap;
/// \brief The LinkingContext.
from->addReference(reference);
}
-/// Does the atom need to be redirected using a separate undefined atom ?
+/// Does the atom need to be redirected using a separate undefined atom?
template <class ELFT>
bool ELFFile<ELFT>::redirectReferenceUsingUndefAtom(
const Elf_Sym *sourceSymbol, const Elf_Sym *targetSymbol) const {
for (const auto &sec : _obj->sections()) {
const coff_section *section = _obj->getCOFFSection(sec);
- // Skip there's no atom for the section. Currently we do not create any
+ // Skip if there's no atom for the section. Currently we do not create any
// atoms for some sections, such as "debug$S", and such sections need to
// be skipped here too.
if (_sectionAtoms.find(section) == _sectionAtoms.end())
if (array.empty())
return "";
+ // This is equivalent to strnlen, but we don't use the function because
+ // it only exists in recent POSIX standards.
size_t len = 0;
size_t e = array.size();
while (len < e && array[len] != '\0')
++len;
+
std::string *contents =
new (_alloc) std::string(reinterpret_cast<const char *>(&array[0]), len);
return StringRef(*contents).trim();