summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2024-04-05 15:37:38 +0000
committerElliott Hughes <enh@google.com>2024-04-05 15:38:18 +0000
commit000016a4d2885b736466cb88455fc5356d442407 (patch)
treedf157e30fe682b2fcb817aa5372293e5074d4a64
parent0aa5cee99136b9ff5137e51981576529fbd6f00e (diff)
downloadunwinding-000016a4d2885b736466cb88455fc5356d442407.tar.gz
Remove duplicate <elf.h> definitions.
All our <elf.h>es are up to date and in sync now. Change-Id: I853d2db2dff622387d151b4add689d4fb1965cbb
-rw-r--r--libunwindstack/ElfInterfaceArm.cpp4
-rw-r--r--libunwindstack/include/unwindstack/Elf.h12
-rw-r--r--libunwindstack/tests/ElfInterfaceTest.cpp8
-rw-r--r--libunwindstack/tests/ElfTest.cpp4
-rw-r--r--libunwindstack/tests/GenGnuDebugdata.cpp4
5 files changed, 0 insertions, 32 deletions
diff --git a/libunwindstack/ElfInterfaceArm.cpp b/libunwindstack/ElfInterfaceArm.cpp
index a960048..7f82ef0 100644
--- a/libunwindstack/ElfInterfaceArm.cpp
+++ b/libunwindstack/ElfInterfaceArm.cpp
@@ -83,10 +83,6 @@ bool ElfInterfaceArm::GetPrel31Addr(uint32_t offset, uint32_t* addr) {
return true;
}
-#if !defined(PT_ARM_EXIDX)
-#define PT_ARM_EXIDX 0x70000001
-#endif
-
void ElfInterfaceArm::HandleUnknownType(uint32_t type, uint64_t ph_offset, uint64_t ph_filesz) {
if (type != PT_ARM_EXIDX) {
return;
diff --git a/libunwindstack/include/unwindstack/Elf.h b/libunwindstack/include/unwindstack/Elf.h
index 15616b6..60bec1e 100644
--- a/libunwindstack/include/unwindstack/Elf.h
+++ b/libunwindstack/include/unwindstack/Elf.h
@@ -29,18 +29,6 @@
#include <unwindstack/Memory.h>
#include <unwindstack/SharedString.h>
-#if !defined(EM_AARCH64)
-#define EM_AARCH64 183
-#endif
-
-#if !defined(EM_RISCV)
-#define EM_RISCV 243
-#endif
-
-#if !defined(SHF_COMPRESSED)
-#define SHF_COMPRESSED 0x800
-#endif
-
namespace unwindstack {
// Forward declaration.
diff --git a/libunwindstack/tests/ElfInterfaceTest.cpp b/libunwindstack/tests/ElfInterfaceTest.cpp
index 27b9f81..6e6b231 100644
--- a/libunwindstack/tests/ElfInterfaceTest.cpp
+++ b/libunwindstack/tests/ElfInterfaceTest.cpp
@@ -35,14 +35,6 @@
#include "ElfTestUtils.h"
#include "utils/MemoryFake.h"
-#if !defined(PT_ARM_EXIDX)
-#define PT_ARM_EXIDX 0x70000001
-#endif
-
-#if !defined(EM_AARCH64)
-#define EM_AARCH64 183
-#endif
-
#if __has_feature(address_sanitizer)
// There is a test that tries to allocate a large value, allow it to fail
// if asan is enabled.
diff --git a/libunwindstack/tests/ElfTest.cpp b/libunwindstack/tests/ElfTest.cpp
index dcb4923..0b73d2b 100644
--- a/libunwindstack/tests/ElfTest.cpp
+++ b/libunwindstack/tests/ElfTest.cpp
@@ -36,10 +36,6 @@
#include "LogFake.h"
#include "utils/MemoryFake.h"
-#if !defined(PT_ARM_EXIDX)
-#define PT_ARM_EXIDX 0x70000001
-#endif
-
namespace unwindstack {
class ElfTest : public ::testing::Test {
diff --git a/libunwindstack/tests/GenGnuDebugdata.cpp b/libunwindstack/tests/GenGnuDebugdata.cpp
index 2644582..cbd6b0d 100644
--- a/libunwindstack/tests/GenGnuDebugdata.cpp
+++ b/libunwindstack/tests/GenGnuDebugdata.cpp
@@ -26,10 +26,6 @@
#include <string>
-#if !defined(EM_AARCH64)
-#define EM_AARCH64 183
-#endif
-
template <typename Ehdr>
void InitEhdr(Ehdr* ehdr, uint32_t elf_class, uint32_t machine) {
memset(ehdr, 0, sizeof(Ehdr));