1

How to open the files with the extension (".so") like libphpcpp.so and ("ELF") format file in editor for editing?

2 Answers2

3

.so files are "Shared Libraries" (https://en.wikipedia.org/wiki/Library_(computing)#Shared_libraries), they are binary-files meant to be dynamically linked to an executable and as such are unusable on their own.

A Library is a collection of related functions and reusable resources to be used by software applications. Shared-libraries are linked at runtime (dynamic linking) as opposed to compile-time hence their name.

If you want to open a shared-library file, you would open it like any other binary file -- with a hex-editor (also called a binary-editor). There are several hex-editors in the standard repositories such as GHex (https://packages.ubuntu.com/xenial/ghex) or Bless (https://packages.ubuntu.com/xenial/bless). The same can be done for ELF executables.

You can install either of them with the following command(s):

sudo apt install ghex

or

sudo apt install bless

But bear in mind though, shared-objects (.so files) are binary files and therefore aren't meant to be edited manually; you might be able to edit a few strings or values with a hex-editor but you won't be able to do much since they are unusable on their own.

hexman
  • 881
0

The files with .so xtension are compiled libraries. The elf format is compiled sourcecode. I do not think you want to edit this one, rather edit the sourcecode of a library and then compile it. See these docs for refrence. it covers idea behind them, compilation, installation and usage of static libraries.

gonczor
  • 181