bool ElfDecoder::demangle(constchar* symbol, char *buf, int buflen) { int status; char* result;
size_t size = (size_t)buflen;
#ifdef PPC64 // On PPC64 ElfDecoder::decode() may return a dot (.) prefixed name // (see elfFuncDescTable.hpp for details) if (symbol && *symbol == '.') symbol += 1; #endif
// Don't pass buf to __cxa_demangle. In case of the 'buf' is too small, // __cxa_demangle will call system "realloc" for additional memory, which // may use different malloc/realloc mechanism that allocates 'buf'. if ((result = abi::__cxa_demangle(symbol, NULL, NULL, &status)) != NULL) {
jio_snprintf(buf, buflen, "%s", result); // call c library's free
ALLOW_C_FUNCTION(::free, ::free(result);) returntrue;
} returnfalse;
}
// Returns true if the elf file is marked NOT to require an executable stack, // or if the file could not be opened. // Returns false if the elf file requires an executable stack, the stack flag // is not set at all, or if the file can not be read. bool ElfFile::specifies_noexecstack(constchar* filepath) { if (filepath == NULL) returntrue;
FILE* file = os::fopen(filepath, "r"); if (file == NULL) returntrue;
// AARCH64 defaults to noexecstack. All others default to execstack. bool result = AARCH64_ONLY(true) NOT_AARCH64(false);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.