mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:27:46 +00:00
LibELF: Remove ELF::Loader and move everyone to ELF::Image
This commit gets rid of ELF::Loader entirely since its very ambiguous purpose was actually to load executables for the kernel, and that is now handled by the kernel itself. This patch includes some drive-by cleanup in LibDebug and CrashDaemon enabled by the fact that we no longer need to keep the ref-counted ELF::Loader around.
This commit is contained in:
parent
7551a66f73
commit
1e4c010643
24 changed files with 178 additions and 318 deletions
|
@ -32,13 +32,13 @@
|
|||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibELF/Loader.h>
|
||||
#include <LibELF/Image.h>
|
||||
|
||||
namespace Debug::Dwarf {
|
||||
|
||||
class DwarfInfo : public RefCounted<DwarfInfo> {
|
||||
class DwarfInfo {
|
||||
public:
|
||||
static NonnullRefPtr<DwarfInfo> create(NonnullRefPtr<const ELF::Loader> elf) { return adopt(*new DwarfInfo(move(elf))); }
|
||||
explicit DwarfInfo(const ELF::Image&);
|
||||
|
||||
ReadonlyBytes debug_info_data() const { return m_debug_info_data; }
|
||||
ReadonlyBytes abbreviation_data() const { return m_abbreviation_data; }
|
||||
|
@ -48,12 +48,11 @@ public:
|
|||
void for_each_compilation_unit(Callback) const;
|
||||
|
||||
private:
|
||||
explicit DwarfInfo(NonnullRefPtr<const ELF::Loader> elf);
|
||||
void populate_compilation_units();
|
||||
|
||||
ReadonlyBytes section_data(const String& section_name) const;
|
||||
|
||||
NonnullRefPtr<const ELF::Loader> m_elf;
|
||||
const ELF::Image& m_elf;
|
||||
ReadonlyBytes m_debug_info_data;
|
||||
ReadonlyBytes m_abbreviation_data;
|
||||
ReadonlyBytes m_debug_strings_data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue