Re: Symbol Hiding
- From: "newbei" <newtoqtopia@xxxxxxxxxxx>
- Date: 28 Mar 2007 20:42:30 -0700
Dear Paul,
THanks a lot for taking the time to reply.
I am sorry for multiple postings.
To examine the dynamic symbol table, use 'nm -D' or 'objdump -T'.The sizeOfInt should not be in *that* output, and so is "invisible"
to the dynamic loader.
I tried doing what you told me but the outputs surprises me even
more .
Function hello is hidden in that out put too.
i did a objdump -T libhello.so , it dint show me any of the symbols
but hello should have been there.
so i did
objdump -t libhello.so, it shows the following:
000005e0 l F .text 00000000 __do_global_ctors_aux
00000000 l df *ABS* 00000000 libhello.c
0000056a l F .text 0000006c .hidden hello
0000179c l O .data 00000000 .hidden __dso_handle
0000054c l F .text 0000000a .hidden sizeOfInt
00000556 l F .text 0000000a .hidden sizeOfShort
00000545 l F .text 00000000 .hidden
__i686.get_pc_thunk.bx
00000560 l F .text 0000000a .hidden sizeOfLong
doesnt this mean even hello is hidden, but i exported it using the
macro.
Thanks
Newbei
On Mar 28, 9:58 pm, Paul Pluzhnikov <ppluzhnikov-...@xxxxxxxxxxx>
wrote:
"newbei" <newtoqto...@xxxxxxxxxxx> writes:
do nm libhello.so
I find both functions hello and sizeOfInt() in it why?
Because you are looking in the wrong place.
ELF shared objects (and executables) have *two* symbol tables --
a "regular" one (used mostly for debugging after the exe/DSO
is built) and a "dynamic" one (used by the dynamic loader for
inter-library symbol resolution).
To examine the dynamic symbol table, use 'nm -D' or 'objdump -T'.
The sizeOfInt should not be in *that* output, and so is "invisible"
to the dynamic loader.
Question 2:
What is the difference between strip and symbol hiding.
Strip manipulates the "regular" symbol table (which you do not care
about, except for debugging).
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.
- Follow-Ups:
- Re: Symbol Hiding
- From: Paul Pluzhnikov
- Re: Symbol Hiding
- References:
- Symbol Hiding
- From: newbei
- Re: Symbol Hiding
- From: Paul Pluzhnikov
- Symbol Hiding
- Prev by Date: Help with ELF's ".symtab" section
- Next by Date: Re: Input video-data to v4l from userspace
- Previous by thread: Re: Symbol Hiding
- Next by thread: Re: Symbol Hiding
- Index(es):
Relevant Pages
|