src/os/linux/vm/os_linux.cpp
Print this page
rev 9708 : 8073139: PPC64: User-visible arch directory and os.arch value on ppc64le cause issues with Java tooling
Summary: Set LIBARCH to ppc64le, make SA and hsdis work, have os.arch return ppc64le on PowerPC64 LE
Reviewed-by: david.holmes@oracle.com, magnus.ihse.bursie@oracle.com
Contributed-by: Andrew Hughes gnu.andrew@redhat.com, Alexander Smundak asmundak@google.com
@@ -1731,11 +1731,11 @@
{EM_SPARCV9, EM_SPARCV9, ELFCLASS64, ELFDATA2MSB, (char*)"Sparc v9 64"},
{EM_PPC, EM_PPC, ELFCLASS32, ELFDATA2MSB, (char*)"Power PC 32"},
#if defined(VM_LITTLE_ENDIAN)
{EM_PPC64, EM_PPC64, ELFCLASS64, ELFDATA2LSB, (char*)"Power PC 64"},
#else
- {EM_PPC64, EM_PPC64, ELFCLASS64, ELFDATA2MSB, (char*)"Power PC 64"},
+ {EM_PPC64, EM_PPC64, ELFCLASS64, ELFDATA2MSB, (char*)"Power PC 64 LE"},
#endif
{EM_ARM, EM_ARM, ELFCLASS32, ELFDATA2LSB, (char*)"ARM"},
{EM_S390, EM_S390, ELFCLASSNONE, ELFDATA2MSB, (char*)"IBM System/390"},
{EM_ALPHA, EM_ALPHA, ELFCLASS64, ELFDATA2LSB, (char*)"Alpha"},
{EM_MIPS_RS3_LE, EM_MIPS_RS3_LE, ELFCLASS32, ELFDATA2LSB, (char*)"MIPSel"},
@@ -2175,10 +2175,12 @@
#if defined(AMD64) || defined(IA32) || defined(X32)
const char* search_string = "model name";
#elif defined(SPARC)
const char* search_string = "cpu";
+#elif defined(PPC64)
+const char* search_string = "cpu";
#else
const char* search_string = "Processor";
#endif
// Parses the cpuinfo file for string representing the model name.