This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Urgent problem with __i686.get_pc_thunk.bx (not the usual problem)


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


      


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]