Re: Symbol Hiding



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.


.



Relevant Pages

  • Re: Symbol Hiding
    ... to the dynamic loader. ... Strip manipulates the "regular" symbol table (which you do not care ... about, except for debugging). ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.development.apps)
  • Re: glibc memory mapping questions
    ... > documentation that is about how glibc works and not what the ... > library functions do? ... You'll have to use the source for dynamic loader (which is part of ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.development.system)
  • Re: Cant run my own programs ?!
    ... time I started using shared libraries instead of building things -static. ... > This is usually an indication that the dynamic loader which is ... > noexec option. ... > In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.embedded)
  • Re: Cant run my own programs ?!
    ... This is usually an indication that the dynamic loader which is ... noexec option. ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.embedded)
  • Re: debugging shared libraries loaded from Python with GDB
    ... Simon Anders writes: ... As for which code actually loads the _graphsim.so, trust me, it *is* ... the dynamic loader that does that. ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.development.apps)