mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:07:46 +00:00
LibELF: Use StringBuilders instead of Strings for the interpreter path
This is required for the Kernel's usage of LibELF, since Strings do not expose allocation failure.
This commit is contained in:
parent
fb3e46e930
commit
3e959618c3
8 changed files with 36 additions and 18 deletions
|
@ -8,10 +8,11 @@
|
|||
|
||||
#include <AK/String.h>
|
||||
#include <LibC/elf.h>
|
||||
#include <limits.h>
|
||||
|
||||
namespace ELF {
|
||||
|
||||
bool validate_elf_header(const ElfW(Ehdr) & elf_header, size_t file_size, bool verbose = true);
|
||||
bool validate_program_headers(const ElfW(Ehdr) & elf_header, size_t file_size, const u8* buffer, size_t buffer_size, String* interpreter_path, bool verbose = true);
|
||||
ErrorOr<bool> validate_program_headers(const ElfW(Ehdr) & elf_header, size_t file_size, const u8* buffer, size_t buffer_size, StringBuilder* interpreter_path_builder, bool verbose = true);
|
||||
|
||||
} // end namespace ELF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue