-Regards
VijayKumar Manchala

Hi , 
 
am a new bie to this group,  am thankful for this group for libXml2 library.
 
I want to compile the source code with gcc -g and -O option, 
 
please let me know where I have to change......
 
 
-Regards
  rahul.
 
 
 

--- On Wed, 19/11/08, Mike Hommey <[EMAIL PROTECTED]> wrote:

From: Mike Hommey <[EMAIL PROTECTED]>
Subject: Re: [xml] elfgcchack.h vs -Bsymbolic
To: "Daniel Veillard" <[EMAIL PROTECTED]>
Cc: [email protected]
Date: Wednesday, 19 November, 2008, 3:16 PM

On Wed, Nov 19, 2008 at 09:32:10AM +0100, Daniel Veillard
<[EMAIL PROTECTED]> wrote:
> On Sat, Nov 15, 2008 at 06:24:48PM +0100, Mike Hommey wrote:
> > Hi,
> > 
> > Have you considered using -Bsymbolic linker option instead of the
> > elfgcchack.h hack ?
> 
>   Hum, no ... I don't know -Bsymbolic, but I fail to see how the
> linker could solve the problem I tried to solve (bypass costly ELF
> lookup when doing internal library calls). Could you explain ?

My understanding of what elfgcchack.h tries to achieve is to remove
indirect calls (through the PLT) for function calls within the library.
-Bsymbolic just does that:

$ cat test.c
int foo(int a)
{
        return a;
}

int bar(void)
{
        return foo(0);
}
$ gcc -shared -fPIC -o test.so test.c
$ objdump -d test.so  |less
$ objdump -d test.so| grep foo
000003c8 <[EMAIL PROTECTED]>:
000004bc <foo>:
 4dd:   e8 e6 fe ff ff          call   3c8 <[EMAIL PROTECTED]>
$ gcc -Wl,-Bsymbolic -shared -fPIC -o test.so test.c
$ objdump -d test.so| grep foo
0000049c <foo>:
 4bd:   e8 da ff ff ff          call   49c <foo>

-Bsymbolic is supposed to do that for most symbols. -Bsymbolic-functions
is specialized to function calls.

Mike
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml



      Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to