summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibELF
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-04 18:02:33 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-06 08:54:33 +0100
commit6e19ab2bbce0b113b628e6f8e9b5c0640053933e (patch)
tree372d21b2f5dcff112f5d0089559c6af5798680d4 /Userland/Libraries/LibELF
parentf74251606d74b504a1379ebb893fdb5529054ea5 (diff)
downloadserenity-6e19ab2bbce0b113b628e6f8e9b5c0640053933e.zip
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
Diffstat (limited to 'Userland/Libraries/LibELF')
-rw-r--r--Userland/Libraries/LibELF/Core.h10
-rw-r--r--Userland/Libraries/LibELF/DynamicLinker.cpp46
-rw-r--r--Userland/Libraries/LibELF/DynamicLinker.h2
-rw-r--r--Userland/Libraries/LibELF/DynamicLoader.cpp20
-rw-r--r--Userland/Libraries/LibELF/DynamicLoader.h10
-rw-r--r--Userland/Libraries/LibELF/DynamicObject.cpp8
-rw-r--r--Userland/Libraries/LibELF/DynamicObject.h10
-rw-r--r--Userland/Libraries/LibELF/Image.cpp4
-rw-r--r--Userland/Libraries/LibELF/Image.h6
9 files changed, 58 insertions, 58 deletions
diff --git a/Userland/Libraries/LibELF/Core.h b/Userland/Libraries/LibELF/Core.h
index 1f19ea688c..d7f98f906a 100644
--- a/Userland/Libraries/LibELF/Core.h
+++ b/Userland/Libraries/LibELF/Core.h
@@ -10,7 +10,7 @@
#include <LibC/sys/arch/i386/regs.h>
#ifndef KERNEL
-# include <AK/String.h>
+# include <AK/DeprecatedString.h>
#endif
namespace ELF::Core {
@@ -39,9 +39,9 @@ struct [[gnu::packed]] ProcessInfo {
// Keys:
// - "pid" (int)
// - "termination_signal" (u8)
- // - "executable_path" (String)
- // - "arguments" (Vector<String>)
- // - "environment" (Vector<String>)
+ // - "executable_path" (DeprecatedString)
+ // - "arguments" (Vector<DeprecatedString>)
+ // - "environment" (Vector<DeprecatedString>)
char json_data[]; // Null terminated
};
@@ -59,7 +59,7 @@ struct [[gnu::packed]] MemoryRegionInfo {
char region_name[]; // Null terminated
#ifndef KERNEL
- String object_name() const
+ DeprecatedString object_name() const
{
StringView memory_region_name { region_name, strlen(region_name) };
if (memory_region_name.contains("Loader.so"sv))
diff --git a/Userland/Libraries/LibELF/DynamicLinker.cpp b/Userland/Libraries/LibELF/DynamicLinker.cpp
index 379bd57fec..6b2e575ce5 100644
--- a/Userland/Libraries/LibELF/DynamicLinker.cpp
+++ b/Userland/Libraries/LibELF/DynamicLinker.cpp
@@ -35,9 +35,9 @@
namespace ELF {
-static HashMap<String, NonnullRefPtr<ELF::DynamicLoader>> s_loaders;
-static String s_main_program_path;
-static OrderedHashMap<String, NonnullRefPtr<ELF::DynamicObject>> s_global_objects;
+static HashMap<DeprecatedString, NonnullRefPtr<ELF::DynamicLoader>> s_loaders;
+static DeprecatedString s_main_program_path;
+static OrderedHashMap<DeprecatedString, NonnullRefPtr<ELF::DynamicObject>> s_global_objects;
using EntryPointFunction = int (*)(int, char**, char**);
using LibCExitFunction = void (*)(int);
@@ -52,13 +52,13 @@ static size_t s_allocated_tls_block_size = 0;
static char** s_envp = nullptr;
static LibCExitFunction s_libc_exit = nullptr;
static __pthread_mutex_t s_loader_lock = __PTHREAD_MUTEX_INITIALIZER;
-static String s_cwd;
+static DeprecatedString s_cwd;
static bool s_allowed_to_check_environment_variables { false };
static bool s_do_breakpoint_trap_before_entry { false };
static StringView s_ld_library_path;
static StringView s_main_program_pledge_promises;
-static String s_loader_pledge_promises;
+static DeprecatedString s_loader_pledge_promises;
static Result<void, DlErrorMessage> __dlclose(void* handle);
static Result<void*, DlErrorMessage> __dlopen(char const* filename, int flags);
@@ -84,7 +84,7 @@ Optional<DynamicObject::SymbolLookupResult> DynamicLinker::lookup_global_symbol(
return weak_result;
}
-static Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> map_library(String const& filepath, int fd)
+static Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> map_library(DeprecatedString const& filepath, int fd)
{
VERIFY(filepath.starts_with('/'));
@@ -104,7 +104,7 @@ static Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> map_library(String c
return loader;
}
-static Optional<String> resolve_library(String const& name, DynamicObject const& parent_object)
+static Optional<DeprecatedString> resolve_library(DeprecatedString const& name, DynamicObject const& parent_object)
{
// Absolute and relative (to the current working directory) paths are already considered resolved.
// However, ensure that the returned path is absolute and canonical, so pass it through LexicalPath.
@@ -129,7 +129,7 @@ static Optional<String> resolve_library(String const& name, DynamicObject const&
for (auto const& search_path : search_paths) {
LexicalPath library_path(search_path.replace("$ORIGIN"sv, LexicalPath::dirname(parent_object.filepath()), ReplaceMode::FirstOnly));
- String library_name = library_path.append(name).string();
+ DeprecatedString library_name = library_path.append(name).string();
if (access(library_name.characters(), F_OK) == 0)
return library_name;
@@ -138,24 +138,24 @@ static Optional<String> resolve_library(String const& name, DynamicObject const&
return {};
}
-static Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> map_library(String const& path)
+static Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> map_library(DeprecatedString const& path)
{
VERIFY(path.starts_with('/'));
int fd = open(path.characters(), O_RDONLY);
if (fd < 0)
- return DlErrorMessage { String::formatted("Could not open shared library '{}': {}", path, strerror(errno)) };
+ return DlErrorMessage { DeprecatedString::formatted("Could not open shared library '{}': {}", path, strerror(errno)) };
return map_library(path, fd);
}
-static Vector<String> get_dependencies(String const& path)
+static Vector<DeprecatedString> get_dependencies(DeprecatedString const& path)
{
VERIFY(path.starts_with('/'));
auto name = LexicalPath::basename(path);
auto lib = s_loaders.get(path).value();
- Vector<String> dependencies;
+ Vector<DeprecatedString> dependencies;
lib->for_each_needed_library([&dependencies, &name](auto needed_name) {
if (name == needed_name)
@@ -165,7 +165,7 @@ static Vector<String> get_dependencies(String const& path)
return dependencies;
}
-static Result<void, DlErrorMessage> map_dependencies(String const& path)
+static Result<void, DlErrorMessage> map_dependencies(DeprecatedString const& path)
{
VERIFY(path.starts_with('/'));
@@ -179,7 +179,7 @@ static Result<void, DlErrorMessage> map_dependencies(String const& path)
auto dependency_path = resolve_library(needed_name, parent_object);
if (!dependency_path.has_value())
- return DlErrorMessage { String::formatted("Could not find required shared library: {}", needed_name) };
+ return DlErrorMessage { DeprecatedString::formatted("Could not find required shared library: {}", needed_name) };
if (!s_loaders.contains(dependency_path.value()) && !s_global_objects.contains(dependency_path.value())) {
auto loader = TRY(map_library(dependency_path.value()));
@@ -303,7 +303,7 @@ static void initialize_libc(DynamicObject& libc)
}
template<typename Callback>
-static void for_each_unfinished_dependency_of(String const& path, HashTable<String>& seen_names, Callback callback)
+static void for_each_unfinished_dependency_of(DeprecatedString const& path, HashTable<DeprecatedString>& seen_names, Callback callback)
{
VERIFY(path.starts_with('/'));
@@ -338,11 +338,11 @@ static void for_each_unfinished_dependency_of(String const& path, HashTable<Stri
callback(*s_loaders.get(path).value());
}
-static NonnullRefPtrVector<DynamicLoader> collect_loaders_for_library(String const& path)
+static NonnullRefPtrVector<DynamicLoader> collect_loaders_for_library(DeprecatedString const& path)
{
VERIFY(path.starts_with('/'));
- HashTable<String> seen_names;
+ HashTable<DeprecatedString> seen_names;
NonnullRefPtrVector<DynamicLoader> loaders;
for_each_unfinished_dependency_of(path, seen_names, [&](auto& loader) {
loaders.append(loader);
@@ -357,7 +357,7 @@ static void drop_loader_promise(StringView promise_to_drop)
s_loader_pledge_promises = s_loader_pledge_promises.replace(promise_to_drop, ""sv, ReplaceMode::All);
- auto extended_promises = String::formatted("{} {}", s_main_program_pledge_promises, s_loader_pledge_promises);
+ auto extended_promises = DeprecatedString::formatted("{} {}", s_main_program_pledge_promises, s_loader_pledge_promises);
Syscall::SC_pledge_params params {
{ extended_promises.characters(), extended_promises.length() },
{ nullptr, 0 },
@@ -369,7 +369,7 @@ static void drop_loader_promise(StringView promise_to_drop)
}
}
-static Result<void, DlErrorMessage> link_main_library(String const& path, int flags)
+static Result<void, DlErrorMessage> link_main_library(DeprecatedString const& path, int flags)
{
VERIFY(path.starts_with('/'));
@@ -384,7 +384,7 @@ static Result<void, DlErrorMessage> link_main_library(String const& path, int fl
for (auto& loader : loaders) {
bool success = loader.link(flags);
if (!success) {
- return DlErrorMessage { String::formatted("Failed to link library {}", loader.filepath()) };
+ return DlErrorMessage { DeprecatedString::formatted("Failed to link library {}", loader.filepath()) };
}
}
@@ -479,7 +479,7 @@ static Result<void*, DlErrorMessage> __dlopen(char const* filename, int flags)
auto library_path = (filename ? resolve_library(filename, parent_object) : s_main_program_path);
if (!library_path.has_value())
- return DlErrorMessage { String::formatted("Could not find required shared library: {}", filename) };
+ return DlErrorMessage { DeprecatedString::formatted("Could not find required shared library: {}", filename) };
auto existing_elf_object = s_global_objects.get(library_path.value());
if (existing_elf_object.has_value()) {
@@ -528,7 +528,7 @@ static Result<void*, DlErrorMessage> __dlsym(void* handle, char const* symbol_na
}
if (!symbol.has_value())
- return DlErrorMessage { String::formatted("Symbol {} not found", symbol_name_view) };
+ return DlErrorMessage { DeprecatedString::formatted("Symbol {} not found", symbol_name_view) };
if (symbol.value().type == STT_GNU_IFUNC)
return (void*)reinterpret_cast<DynamicObject::IfuncResolver>(symbol.value().address.as_ptr())();
@@ -602,7 +602,7 @@ static void read_environment_variables()
}
}
-void ELF::DynamicLinker::linker_main(String&& main_program_path, int main_program_fd, bool is_secure, int argc, char** argv, char** envp)
+void ELF::DynamicLinker::linker_main(DeprecatedString&& main_program_path, int main_program_fd, bool is_secure, int argc, char** argv, char** envp)
{
VERIFY(main_program_path.starts_with('/'));
diff --git a/Userland/Libraries/LibELF/DynamicLinker.h b/Userland/Libraries/LibELF/DynamicLinker.h
index 9aa256c926..df17bae74a 100644
--- a/Userland/Libraries/LibELF/DynamicLinker.h
+++ b/Userland/Libraries/LibELF/DynamicLinker.h
@@ -15,7 +15,7 @@ namespace ELF {
class DynamicLinker {
public:
static Optional<DynamicObject::SymbolLookupResult> lookup_global_symbol(StringView symbol);
- [[noreturn]] static void linker_main(String&& main_program_path, int fd, bool is_secure, int argc, char** argv, char** envp);
+ [[noreturn]] static void linker_main(DeprecatedString&& main_program_path, int fd, bool is_secure, int argc, char** argv, char** envp);
private:
DynamicLinker() = delete;
diff --git a/Userland/Libraries/LibELF/DynamicLoader.cpp b/Userland/Libraries/LibELF/DynamicLoader.cpp
index 15c5b1bc69..1a836f5f00 100644
--- a/Userland/Libraries/LibELF/DynamicLoader.cpp
+++ b/Userland/Libraries/LibELF/DynamicLoader.cpp
@@ -37,7 +37,7 @@ static void* mmap_with_name(void* addr, size_t length, int prot, int flags, int
namespace ELF {
-Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> DynamicLoader::try_create(int fd, String filepath)
+Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> DynamicLoader::try_create(int fd, DeprecatedString filepath)
{
VERIFY(filepath.starts_with('/'));
@@ -49,9 +49,9 @@ Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> DynamicLoader::try_create(i
VERIFY(stat.st_size >= 0);
auto size = static_cast<size_t>(stat.st_size);
if (size < sizeof(ElfW(Ehdr)))
- return DlErrorMessage { String::formatted("File {} has invalid ELF header", filepath) };
+ return DlErrorMessage { DeprecatedString::formatted("File {} has invalid ELF header", filepath) };
- String file_mmap_name = String::formatted("ELF_DYN: {}", filepath);
+ DeprecatedString file_mmap_name = DeprecatedString::formatted("ELF_DYN: {}", filepath);
auto* data = mmap_with_name(nullptr, size, PROT_READ, MAP_SHARED, fd, 0, file_mmap_name.characters());
if (data == MAP_FAILED) {
return DlErrorMessage { "DynamicLoader::try_create mmap" };
@@ -63,7 +63,7 @@ Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> DynamicLoader::try_create(i
return loader;
}
-DynamicLoader::DynamicLoader(int fd, String filepath, void* data, size_t size)
+DynamicLoader::DynamicLoader(int fd, DeprecatedString filepath, void* data, size_t size)
: m_filepath(move(filepath))
, m_file_size(size)
, m_image_fd(fd)
@@ -230,19 +230,19 @@ Result<NonnullRefPtr<DynamicObject>, DlErrorMessage> DynamicLoader::load_stage_3
// If we don't have textrels, .text has already been made executable by this point in load_stage_2.
for (auto& text_segment : m_text_segments) {
if (mprotect(text_segment.address().as_ptr(), text_segment.size(), PROT_READ | PROT_EXEC) < 0) {
- return DlErrorMessage { String::formatted("mprotect .text: PROT_READ | PROT_EXEC: {}", strerror(errno)) };
+ return DlErrorMessage { DeprecatedString::formatted("mprotect .text: PROT_READ | PROT_EXEC: {}", strerror(errno)) };
}
}
}
if (m_relro_segment_size) {
if (mprotect(m_relro_segment_address.as_ptr(), m_relro_segment_size, PROT_READ) < 0) {
- return DlErrorMessage { String::formatted("mprotect .relro: PROT_READ: {}", strerror(errno)) };
+ return DlErrorMessage { DeprecatedString::formatted("mprotect .relro: PROT_READ: {}", strerror(errno)) };
}
#ifdef AK_OS_SERENITY
- if (set_mmap_name(m_relro_segment_address.as_ptr(), m_relro_segment_size, String::formatted("{}: .relro", m_filepath).characters()) < 0) {
- return DlErrorMessage { String::formatted("set_mmap_name .relro: {}", strerror(errno)) };
+ if (set_mmap_name(m_relro_segment_address.as_ptr(), m_relro_segment_size, DeprecatedString::formatted("{}: .relro", m_filepath).characters()) < 0) {
+ return DlErrorMessage { DeprecatedString::formatted("set_mmap_name .relro: {}", strerror(errno)) };
}
#endif
}
@@ -324,7 +324,7 @@ void DynamicLoader::load_program_headers()
}
// Now that we can't accidentally block our requested space, re-map our ELF image.
- String file_mmap_name = String::formatted("ELF_DYN: {}", m_filepath);
+ DeprecatedString file_mmap_name = DeprecatedString::formatted("ELF_DYN: {}", m_filepath);
auto* data = mmap_with_name(nullptr, m_file_size, PROT_READ, MAP_SHARED, m_image_fd, 0, file_mmap_name.characters());
if (data == MAP_FAILED) {
perror("mmap new mapping");
@@ -446,7 +446,7 @@ void DynamicLoader::load_program_headers()
MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED,
0,
0,
- String::formatted("{}: .data", m_filepath).characters());
+ DeprecatedString::formatted("{}: .data", m_filepath).characters());
if (MAP_FAILED == data_segment) {
perror("mmap writable");
diff --git a/Userland/Libraries/LibELF/DynamicLoader.h b/Userland/Libraries/LibELF/DynamicLoader.h
index 70640b2101..199bf13e22 100644
--- a/Userland/Libraries/LibELF/DynamicLoader.h
+++ b/Userland/Libraries/LibELF/DynamicLoader.h
@@ -8,9 +8,9 @@
#pragma once
#include <AK/Assertions.h>
+#include <AK/DeprecatedString.h>
#include <AK/OwnPtr.h>
#include <AK/RefCounted.h>
-#include <AK/String.h>
#include <LibC/elf.h>
#include <LibELF/DynamicObject.h>
#include <LibELF/Image.h>
@@ -42,10 +42,10 @@ enum class ShouldInitializeWeak {
class DynamicLoader : public RefCounted<DynamicLoader> {
public:
- static Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> try_create(int fd, String filepath);
+ static Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> try_create(int fd, DeprecatedString filepath);
~DynamicLoader();
- String const& filepath() const { return m_filepath; }
+ DeprecatedString const& filepath() const { return m_filepath; }
bool is_valid() const { return m_valid; }
@@ -87,7 +87,7 @@ public:
bool is_fully_initialized() const { return m_fully_initialized; }
private:
- DynamicLoader(int fd, String filepath, void* file_data, size_t file_size);
+ DynamicLoader(int fd, DeprecatedString filepath, void* file_data, size_t file_size);
class ProgramHeaderRegion {
public:
@@ -137,7 +137,7 @@ private:
void do_relr_relocations();
void find_tls_size_and_alignment();
- String m_filepath;
+ DeprecatedString m_filepath;
size_t m_file_size { 0 };
int m_image_fd { -1 };
void* m_file_data { nullptr };
diff --git a/Userland/Libraries/LibELF/DynamicObject.cpp b/Userland/Libraries/LibELF/DynamicObject.cpp
index 193c9c4230..a0eb6b6d7b 100644
--- a/Userland/Libraries/LibELF/DynamicObject.cpp
+++ b/Userland/Libraries/LibELF/DynamicObject.cpp
@@ -6,7 +6,7 @@
*/
#include <AK/Debug.h>
-#include <AK/String.h>
+#include <AK/DeprecatedString.h>
#include <AK/StringBuilder.h>
#include <LibC/elf.h>
#include <LibELF/DynamicLoader.h>
@@ -16,7 +16,7 @@
namespace ELF {
-DynamicObject::DynamicObject(String const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address)
+DynamicObject::DynamicObject(DeprecatedString const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address)
: m_filepath(filepath)
, m_base_address(base_address)
, m_dynamic_address(dynamic_section_address)
@@ -45,7 +45,7 @@ void DynamicObject::dump() const
size_t num_dynamic_sections = 0;
for_each_dynamic_entry([&](DynamicObject::DynamicEntry const& entry) {
- String name_field = String::formatted("({})", name_for_dtag(entry.tag()));
+ DeprecatedString name_field = DeprecatedString::formatted("({})", name_for_dtag(entry.tag()));
builder.appendff("{:#08x} {:17} {:#08x}\n", entry.tag(), name_field, entry.val());
num_dynamic_sections++;
});
@@ -475,7 +475,7 @@ auto DynamicObject::lookup_symbol(HashSymbol const& symbol) const -> Optional<Sy
return SymbolLookupResult { symbol_result.value(), symbol_result.size(), symbol_result.address(), symbol_result.bind(), symbol_result.type(), this };
}
-NonnullRefPtr<DynamicObject> DynamicObject::create(String const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address)
+NonnullRefPtr<DynamicObject> DynamicObject::create(DeprecatedString const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address)
{
return adopt_ref(*new DynamicObject(filepath, base_address, dynamic_section_address));
}
diff --git a/Userland/Libraries/LibELF/DynamicObject.h b/Userland/Libraries/LibELF/DynamicObject.h
index 7bf874f410..8be9fdf8ed 100644
--- a/Userland/Libraries/LibELF/DynamicObject.h
+++ b/Userland/Libraries/LibELF/DynamicObject.h
@@ -10,8 +10,8 @@
#include <AK/Assertions.h>
#include <AK/Concepts.h>
+#include <AK/DeprecatedString.h>
#include <AK/RefCounted.h>
-#include <AK/String.h>
#include <Kernel/VirtualAddress.h>
#include <LibC/elf.h>
#include <LibC/link.h>
@@ -20,7 +20,7 @@ namespace ELF {
class DynamicObject : public RefCounted<DynamicObject> {
public:
- static NonnullRefPtr<DynamicObject> create(String const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address);
+ static NonnullRefPtr<DynamicObject> create(DeprecatedString const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address);
static char const* name_for_dtag(ElfW(Sword) d_tag);
~DynamicObject();
@@ -287,7 +287,7 @@ public:
VirtualAddress plt_got_base_address() const { return m_base_address.offset(m_procedure_linkage_table_offset.value()); }
VirtualAddress base_address() const { return m_base_address; }
- String const& filepath() const { return m_filepath; }
+ DeprecatedString const& filepath() const { return m_filepath; }
StringView rpath() const { return m_has_rpath ? symbol_string_table_string(m_rpath_index) : StringView {}; }
StringView runpath() const { return m_has_runpath ? symbol_string_table_string(m_runpath_index) : StringView {}; }
@@ -338,13 +338,13 @@ public:
void* symbol_for_name(StringView name);
private:
- explicit DynamicObject(String const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address);
+ explicit DynamicObject(DeprecatedString const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address);
StringView symbol_string_table_string(ElfW(Word)) const;
char const* raw_symbol_string_table_string(ElfW(Word)) const;
void parse();
- String m_filepath;
+ DeprecatedString m_filepath;
VirtualAddress m_base_address;
VirtualAddress m_dynamic_address;
diff --git a/Userland/Libraries/LibELF/Image.cpp b/Userland/Libraries/LibELF/Image.cpp
index 6a32c3a82f..49af2ef3eb 100644
--- a/Userland/Libraries/LibELF/Image.cpp
+++ b/Userland/Libraries/LibELF/Image.cpp
@@ -424,7 +424,7 @@ NEVER_INLINE void Image::sort_symbols() const
});
}
-String Image::symbolicate(FlatPtr address, u32* out_offset) const
+DeprecatedString Image::symbolicate(FlatPtr address, u32* out_offset) const
{
auto symbol_count = this->symbol_count();
if (!symbol_count) {
@@ -448,7 +448,7 @@ String Image::symbolicate(FlatPtr address, u32* out_offset) const
*out_offset = address - symbol->address;
return demangled_name;
}
- return String::formatted("{} +{:#x}", demangled_name, address - symbol->address);
+ return DeprecatedString::formatted("{} +{:#x}", demangled_name, address - symbol->address);
}
#endif
diff --git a/Userland/Libraries/LibELF/Image.h b/Userland/Libraries/LibELF/Image.h
index 7af308a810..b0bdba0304 100644
--- a/Userland/Libraries/LibELF/Image.h
+++ b/Userland/Libraries/LibELF/Image.h
@@ -13,7 +13,7 @@
#include <LibC/elf.h>
#ifndef KERNEL
-# include <AK/String.h>
+# include <AK/DeprecatedString.h>
#endif
namespace ELF {
@@ -238,7 +238,7 @@ public:
bool has_symbols() const { return symbol_count(); }
#ifndef KERNEL
Optional<Symbol> find_demangled_function(StringView name) const;
- String symbolicate(FlatPtr address, u32* offset = nullptr) const;
+ DeprecatedString symbolicate(FlatPtr address, u32* offset = nullptr) const;
#endif
Optional<Image::Symbol> find_symbol(FlatPtr address, u32* offset = nullptr) const;
@@ -263,7 +263,7 @@ private:
struct SortedSymbol {
FlatPtr address;
StringView name;
- String demangled_name;
+ DeprecatedString demangled_name;
Optional<Image::Symbol> symbol;
};