Removing an entry from the DYNAMIC section of an elf file

I have a third-party library A , which requires some libraries Bed and . A associated with binrary, which is associated with the static version B . Therefore there is no need for a dynamic version of the Bed and .

A is not under my control, and I cannot recompile it. Thus, I want to delete an entry NEEDED libAfrom the DYNAMIC section A .

Is there a way to do this with objcopy or another tool?

+5
source share
1 answer

Is there a way to do this with objcopy or another tool?

, , elfsh .

C, , : .dynamic libA.so - ( ElfW(Dyn)), .d_type == DT_NULL. DT_NEEDED, "" ( entry[n] entry[n+1] ..). , .dynamic DT_NULL , .

, libB.so , libA.so, DT_VERNEED libB.so, . VERNEED, .

+1

All Articles