This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Urgent problem with __i686.get_pc_thunk.bx (not the usual problem)
- From: "Dr. Peter Burkhard" <dr dot peterburkhard at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 16 May 2008 08:48:39 -0700 (PDT)
- Subject: Urgent problem with __i686.get_pc_thunk.bx (not the usual problem)
- Reply-to: dr dot peterburkhard at yahoo dot com
Hi all,
I'm in trouble with -fpic code. Maybe some expert here may help?
The problem:
I make a custom ELF binary, where I add a custom section .special
This worked for me, I can mark functions/data with __attribute__ and move the code in the output to section .special (I added .special definitions to the linker script).
However, If I compile it with -fpic, then the __i686.get_pc_thunk.bx() stub comes from some other library and goes into .text, not .special.
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.
Is this possible? And how?
*desperated*
Thanks