From a7927cff2f6e51cbc853fc432ce42a110ab9c691 Mon Sep 17 00:00:00 2001 From: Marcin Chwedczuk <0xmarcin+dev@gmail.com> Date: Fri, 24 Dec 2021 15:11:44 +0100 Subject: [PATCH] Clenup test packages --- .../elf/shared/notes/ElfNoteGnuBuildAttribute.java | 3 ++- .../{elf32 => }/ElfReader_32Bits_Test.java | 2 +- .../{elf32 => }/ElfReader_64Bits_Test.java | 7 ++++++- .../elfreader/{elf32 => }/arm64-libc-2.33.so | Bin .../elfviewer/elfreader/{elf32 => }/caller-libfoo | Bin .../elfviewer/elfreader/{elf32 => }/hello-world-32 | Bin .../elfviewer/elfreader/{elf32 => }/hello-world-64 | Bin .../elfviewer/elfreader/{elf32 => }/ld-2.17.so | Bin .../elfviewer/elfreader/{elf32 => }/libc-2.17.so | Bin .../elfviewer/elfreader/{elf32 => }/libc-2.33.so | Bin .../elfviewer/elfreader/{elf32 => }/libfoo.so | Bin 11 files changed, 9 insertions(+), 3 deletions(-) rename elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/{elf32 => }/ElfReader_32Bits_Test.java (99%) rename elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/{elf32 => }/ElfReader_64Bits_Test.java (98%) rename elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/{elf32 => }/arm64-libc-2.33.so (100%) rename elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/{elf32 => }/caller-libfoo (100%) rename elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/{elf32 => }/hello-world-32 (100%) rename elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/{elf32 => }/hello-world-64 (100%) rename elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/{elf32 => }/ld-2.17.so (100%) rename elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/{elf32 => }/libc-2.17.so (100%) rename elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/{elf32 => }/libc-2.33.so (100%) rename elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/{elf32 => }/libfoo.so (100%) diff --git a/elf-reader/src/main/java/pl/marcinchwedczuk/elfviewer/elfreader/elf/shared/notes/ElfNoteGnuBuildAttribute.java b/elf-reader/src/main/java/pl/marcinchwedczuk/elfviewer/elfreader/elf/shared/notes/ElfNoteGnuBuildAttribute.java index 2cd9f00..81d47c9 100644 --- a/elf-reader/src/main/java/pl/marcinchwedczuk/elfviewer/elfreader/elf/shared/notes/ElfNoteGnuBuildAttribute.java +++ b/elf-reader/src/main/java/pl/marcinchwedczuk/elfviewer/elfreader/elf/shared/notes/ElfNoteGnuBuildAttribute.java @@ -132,6 +132,7 @@ public Object buildAttributeValue() { // Unknown value type return null; } - } + + // TODO: Memory range } diff --git a/elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/elf32/ElfReader_32Bits_Test.java b/elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/ElfReader_32Bits_Test.java similarity index 99% rename from elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/elf32/ElfReader_32Bits_Test.java rename to elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/ElfReader_32Bits_Test.java index 85ef457..67f0700 100644 --- a/elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/elf32/ElfReader_32Bits_Test.java +++ b/elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/ElfReader_32Bits_Test.java @@ -1,4 +1,4 @@ -package pl.marcinchwedczuk.elfviewer.elfreader.elf32; +package pl.marcinchwedczuk.elfviewer.elfreader; import org.junit.jupiter.api.Test; import pl.marcinchwedczuk.elfviewer.elfreader.ElfReader; diff --git a/elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/elf32/ElfReader_64Bits_Test.java b/elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/ElfReader_64Bits_Test.java similarity index 98% rename from elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/elf32/ElfReader_64Bits_Test.java rename to elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/ElfReader_64Bits_Test.java index 6b3ea75..3ffa9af 100644 --- a/elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/elf32/ElfReader_64Bits_Test.java +++ b/elf-reader/src/test/java/pl/marcinchwedczuk/elfviewer/elfreader/ElfReader_64Bits_Test.java @@ -1,4 +1,4 @@ -package pl.marcinchwedczuk.elfviewer.elfreader.elf32; +package pl.marcinchwedczuk.elfviewer.elfreader; import org.junit.jupiter.api.Test; import pl.marcinchwedczuk.elfviewer.elfreader.ElfReader; @@ -34,6 +34,7 @@ public class ElfReader_64Bits_Test { private final AbstractFile helloWorld64; private final AbstractFile libc64; private final AbstractFile ld64; + private final AbstractFile arm64libc; public ElfReader_64Bits_Test() throws IOException { helloWorld64 = new InMemoryFile(this.getClass() @@ -47,6 +48,10 @@ public ElfReader_64Bits_Test() throws IOException { ld64 = new InMemoryFile(this.getClass() .getResourceAsStream("ld-2.17.so") .readAllBytes()); + + arm64libc = new InMemoryFile(this.getClass() + .getResourceAsStream("arm64-libc-2.33.so") + .readAllBytes()); } @Test diff --git a/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/arm64-libc-2.33.so b/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/arm64-libc-2.33.so similarity index 100% rename from elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/arm64-libc-2.33.so rename to elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/arm64-libc-2.33.so diff --git a/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/caller-libfoo b/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/caller-libfoo similarity index 100% rename from elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/caller-libfoo rename to elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/caller-libfoo diff --git a/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/hello-world-32 b/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/hello-world-32 similarity index 100% rename from elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/hello-world-32 rename to elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/hello-world-32 diff --git a/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/hello-world-64 b/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/hello-world-64 similarity index 100% rename from elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/hello-world-64 rename to elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/hello-world-64 diff --git a/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/ld-2.17.so b/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/ld-2.17.so similarity index 100% rename from elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/ld-2.17.so rename to elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/ld-2.17.so diff --git a/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/libc-2.17.so b/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/libc-2.17.so similarity index 100% rename from elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/libc-2.17.so rename to elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/libc-2.17.so diff --git a/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/libc-2.33.so b/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/libc-2.33.so similarity index 100% rename from elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/libc-2.33.so rename to elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/libc-2.33.so diff --git a/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/libfoo.so b/elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/libfoo.so similarity index 100% rename from elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/elf32/libfoo.so rename to elf-reader/src/test/resources/pl/marcinchwedczuk/elfviewer/elfreader/libfoo.so