这是indexloc提供的服务,不要输入任何密码
Skip to content

Silently does nothing with 4kb LOAD section alignment #35

@4ntoine

Description

@4ntoine

I've extracted 3.0.1 locally and it's compiled with NDK 27:

/Users/anton/dev/src/termux-elf-cleaner [master] > ./termux-elf-cleaner -version
termux-elf-cleaner 3.0.1
Copyright (C) 2022-2024 Termux and contributors.
termux-elf-cleaner comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of termux-elf-cleaner
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

I have the following code (echo.cpp):

#include <iostream>
int main() {
 for (int i = 0; i < 10; ++i)
   std::cout << "Hello................ " << std::endl;
return 0;
}

compiled with CMake into the aarch64 executable.

CMakeLists.txt is the following:

set(CMAKE_EXE_LINKER_FLAGS "-static -ffunction-sections -fdata-sections -Wl,--gc-sections")
add_executable(echo echo.cpp)

Android studio reports it has 4Kb LOAD section alignment (file renamed):

Image

Running termux-elf-cleaner on it silently does nothing:

anton /Users/anton/dev/src/termux-elf-cleaner [master] > ./termux-elf-cleaner /Users/anton/dev/src/project/raw_arm_23/src/main/jniLibs/arm64-v8a/echo
anton /Users/anton/dev/src/termux-elf-cleaner [master] >

File size is the same, MD5 hash is the same.
Is there anything i'm doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions