diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2022-11-06 10:07:02 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2022-11-06 10:07:02 +0100 |
commit | da968fb849420382d07324472dccf93a8b4c64b5 (patch) | |
tree | 3400b6482f60e84e2f70257ee09d69ef66a07bfc /src | |
parent | c3682eb555bbbf30574166ac4625d9bf259b433e (diff) | |
download | patchelf-da968fb849420382d07324472dccf93a8b4c64b5.tar.gz |
patchelf: correct page size for sparc64/sparc32
Diffstat (limited to 'src')
-rw-r--r-- | src/patchelf.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc index eac156d..bfa6491 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -319,7 +319,6 @@ unsigned int ElfFile<ElfFileParamNames>::getPageSize() const // current list is extracted from GNU gold's source code (abi_pagesize). switch (rdi(hdr()->e_machine)) { case EM_IA_64: - case EM_SPARC: case EM_MIPS: case EM_PPC: case EM_PPC64: @@ -327,6 +326,10 @@ unsigned int ElfFile<ElfFileParamNames>::getPageSize() const case EM_TILEGX: case EM_LOONGARCH: return 0x10000; + case EM_SPARC: // This should be sparc 32-bit. According to the linux + // kernel 4KB should be also fine, but it seems that solaris is doing 8KB + case EM_SPARCV9: /* SPARC64 support */ + return 0x2000; default: return 0x1000; } |