Use uintptr_t instead of addr_t

They're never actually going to change independently, and it's also
brining in kutil headers more places than they should be.
This commit is contained in:
Justin C. Miller
2018-09-20 09:37:30 -07:00
parent a9d72b8102
commit cef0a71bce
20 changed files with 108 additions and 112 deletions

View File

@@ -1,5 +1,6 @@
#include "elf/elf.h"
#include "elf/headers.h"
#include "kutil/memory.h"
static const uint32_t expected_magic = 0x464c457f; // "\x7f" "ELF"

View File

@@ -1,7 +1,7 @@
#pragma once
#include <stddef.h>
#include <stdint.h>
#include "elf/headers.h"
#include "kutil/memory.h"
namespace elf {
@@ -19,9 +19,9 @@ public:
/// Get the entrypoint address of the program image
/// \returns A pointer to the entrypoint of the program
inline addr_t entrypoint() const
inline uintptr_t entrypoint() const
{
return static_cast<addr_t>(header()->entrypoint);
return static_cast<uintptr_t>(header()->entrypoint);
}
/// Get the number of program sections in the image