Method for obtaining program address under musl gcc compilation running environment
By obtaining the offset and real address of the dlsym function under the musl-gcc platform and combining it with preloading technology, the problem that ld_preload technology cannot replace JNI_CreateJavaVM() is solved, realizing the embedding and tracking operation and maintenance capabilities of intelligent operation and maintenance tools without modifying service code or recompiling programs.
Patent Information
- Application Number
- CN202311582996.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2026-07-24
- Estimated Expiration
- 2043-11-24
AI Technical Summary
On the musl-gcc platform, the ld_preload technology cannot replace the JNI_CreateJavaVM() function, making it impossible to achieve intelligent embedding and traceable maintenance without modifying the service code or recompiling the program.
By obtaining the offset and actual address of the dlsym function and combining it with preloading technology, the program address can be obtained on the musl-gcc platform, enabling the injection and modification of JVM startup and Java service parameters.
Without modifying the service code or recompiling the program, the intelligent operation and maintenance tool on the musl-gcc platform has achieved intelligent embedding and tracking of services, and has realized the flexible use of preloading technology by leveraging the dynamic library loading and function address redirection features.