Urgent problem with __i686.get_pc_thunk.bx (not the usual problem)
Dr. Peter Burkhard
dr.peterburkhard@yahoo.com
Mon May 19 11:12:00 GMT 2008
Hi,
yes - this worked for me by adding
*(.text.__i686.*)
to the spec of .special in the linker script.
However, now, I would like to use my own version of __i686.get_pc_thunk.bx. The point is that each library used for linking with -fpic code has its own linkonce section containing __i686.get_pc_thunk.bx and I have no control which object file contributes the section to the final output. Is there a solution?
I would like to write a replacement for __i686.get_pc_thunk.bx and put it e.g. in a little thunk.S source and tell gcc to use only this one. But how can I do that? Is there a deterministic way to control how gcc orders the linkonce sections?
Thanks.
--- On Sat, 5/17/08, Florian Weimer <fw@deneb.enyo.de> wrote:
> From: Florian Weimer <fw@deneb.enyo.de>
> Subject: Re: Urgent problem with __i686.get_pc_thunk.bx (not the usual problem)
> To: dr.peterburkhard@yahoo.com
> Cc: gcc-help@gcc.gnu.org
> Date: Saturday, May 17, 2008, 9:30 PM
> * Peter Burkhard:
>
> > I would like to use my own __i686.get_pc_thunk.bx()
> inside the section
> > .special to avoid calls to .text from .special. The
> section .special
> > must be "self-contained", that is it may not
> call
> > __i686.get_pc_thunk.bx() in .text. Instead I woudl
> like to write my
> > own version of __i686.get_pc_thunk.bx() and put it
> into special.
>
> The function is already in its own pseudo-section, so you
> should try to
> merge it with .special using a suitable ld script.
More information about the Gcc-help
mailing list