Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to read .so lib file

1,348 views
Skip to first unread message

lina

unread,
Aug 18, 2011, 12:40:02 PM8/18/11
to
Hi,

I don't know how to read the .so file under /usr/lib/

the Binary file.

Thanks,

lina


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/CAG9cJmmEq4+yi7jvzoOMgR-w3-SbOFyOGOvnbzTe=gQvA...@mail.gmail.com

Wayne Topa

unread,
Aug 18, 2011, 1:00:02 PM8/18/11
to
On 08/18/2011 12:37 PM, lina wrote:
> Hi,
>
> I don't know how to read the .so file under /usr/lib/
>
> the Binary file.
>

Then it probably will not help you but you can read a binary file by
using 'more', instead of 'less' but you wont be able to understand it.


WT


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/4E4D447D...@gmail.com

Tomas Kral

unread,
Aug 18, 2011, 1:40:02 PM8/18/11
to
On Thu, 2011-08-18 at 18:37 +0200, lina wrote:
> Hi,
>
> I don't know how to read the .so file under /usr/lib/
>
> the Binary file.
>
> Thanks,
>
> lina
>
>
You may also try
hexdump command

$ hd <binary_file> | less # or
$ hd -s <offset> -n <length> <binary_file>
--
Tomas Kral <thoma...@email.cz>


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/1313688692....@lynx.localhost.localdomain

Ivan Shmakov

unread,
Aug 18, 2011, 2:00:02 PM8/18/11
to
>>>>> lina <lina.l...@gmail.com> writes:

> I don't know how to read the .so file under /usr/lib/

> the Binary file.

That depends on the purpose.

In particular, ldd(1) shows .so's dependencies, nm(1) shows the
names' to addresses correspondence (for functions, global
variables, etc.), strings(1) shows strings embedded within such
a file, etc.

--
FSF associate member #7257 Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/86ty9ev...@gray.siamics.net

Wayne Topa

unread,
Aug 18, 2011, 3:40:03 PM8/18/11
to

On Aug 19, 2011, at 0:57, Wayne Topa <linu...@gmail.com> wrote:


Putting this back on the list. It is against DU Code of Conduct to
reply to list messages off list unless asked to.

Others may have the same question and it is unfair to them to take it
off list.


> On 08/18/2011 12:37 PM, lina wrote:
>> Hi,
>>
>> I don't know how to read the .so file under /usr/lib/
>>
>> the Binary file.
>>
>
> Then it probably will not help you but you can read a binary file by using 'more', instead of 'less' but you wont be able to understand it.

SORRY I missed typed I meant to write most , NOT more

>> Then how does someone can use some bash script or sed command work
>> on .so file without reading it.

They don't. .so files are library files and users do not normally do
ANYTHING to them other them use them.

Try using most filename.whatever.so to read them and you will see why I
said you would not understand it.


>> I tried cat, all unreadable.
cat, less and more are used to read ASCII files. see man most

Here is a small example:
most /lib/libproc-3.2.8.so
0x00000000: 7F454C46 02010100 00000000 00000000 .ELF............
0x00000010: 03003E00 01000000 B0410000 00000000 ..>.....°A......
0x00000020: 40000000 00000000 801E0100 00000000 @...............
0x00000030: 00000000 40003800 06004000 1D001C00 ....@.8...@.....
0x00000040: 01000000 05000000 00000000 00000000 ................
0x00000050: 00000000 00000000 00000000 00000000 ................
0x00000060: 74060100 00000000 74060100 00000000 t.......t.......
0x00000070: 00002000 00000000 01000000 06000000 .. .............
0x00000080: 00100100 00000000 00102100 00000000 ..........!.....
0x00000090: 00102100 00000000 840D0000 00000000 ..!.............
0x000000A0: 583D0100 00000000 00002000 00000000 X=........ .....
0x000000B0: 02000000 06000000 40170100 00000000 ........@.......
0x000000C0: 40172100 00000000 40172100 00000000 @.!.....@.!.....
0x000000D0: E0010000 00000000 E0010000 00000000 à.......à.......
0x000000E0: 08000000 00000000 04000000 04000000 ................
0x000000F0: 90010000 00000000 90010000 00000000 ................
0x00000100: 90010000 00000000 24000000 00000000 ........$.......
0x00000110: 24000000 00000000 04000000 00000000 $...............
0x00000120: 50E57464 04000000 B8F70000 00000000 Påtd....¸÷......
0x00000130: B8F70000 00000000 B8F70000 00000000 ¸÷......¸÷......
0x00000140: E4020000 00000000 E4020000 00000000 ä.......ä.......
0x00000150: 04000000 00000000 51E57464 06000000 ........Qåtd....
0x00000160: 00000000 00000000 00000000 00000000 ................
0x00000170: 00000000 00000000 00000000 00000000 ................
0x00000180: 00000000 00000000 08000000 00000000 ................
0x00000190: 04000000 14000000 03000000 474E5500 ............GNU.
0x000001A0: 0AF01829 963B92EE 4123DA14 E0EBADCE .ð.).;.îA#Ú.àë­Î
0x000001B0: 2D19665C 00000000 83000000 99000000 -.f\............

Wayne

--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/4E4D69B4...@gmail.com

shawn wilson

unread,
Aug 18, 2011, 6:30:02 PM8/18/11
to
first, there's a #re channel on freenode that might be able to help
you better. though, i'd first brush up on my assembly and gdb before
looking there :)

basically, you can link a program against a library (or find a program
that calls a library - ldd or strace come to mind), open it up with
gdb, run it, disassemble it, and then step through it and look at how
registers change. but, if you have no idea what a library is for, i
don't know how you'd link against it to start that process....

also, you might look at 'Lenas Reversing for Newbies' it is mainly
windows, but same concepts.

all that said, i have a feeling i've misunderstood your question or
you have no idea what a linkable library is (for)?

Archive: http://lists.debian.org/CAH_OBiduvYAb5QBy_an-U_Pz...@mail.gmail.com

lina

unread,
Aug 20, 2011, 2:10:01 AM8/20/11
to
On Fri, Aug 19, 2011 at 6:26 AM, shawn wilson <ag4v...@gmail.com> wrote:
> first, there's a #re channel on freenode that might be able to help
> you better. though, i'd first brush up on my assembly and gdb before
> looking there :)

#re channel on freenode?

>
> basically, you can link a program against a library (or find a program
> that calls a library - ldd or strace come to mind), open it up with
> gdb, run it, disassemble it, and then step through it and look at how
> registers change. but, if you have no idea what a library is for, i
> don't know how you'd link against it to start that process....
>
> also, you might look at 'Lenas Reversing for Newbies' it is mainly
> windows, but same concepts.

Thanks.

>
> all that said, i have a feeling i've misunderstood your question or
> you have no idea what a linkable library is (for)?

I am afraid so. I tried to google "a linkable library".

--
Best Regards,

lina


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/CAG9cJmmXxPGhh_Cf0uGktfb...@mail.gmail.com

0 new messages