inline assem problem with -fPIC gcc3.3.1

K

kscho

Hi~

When I make shared library with option -fPIC, the result is wrong and
different
that made static library.

first time , I made apps with static library. code works fine.
however when i make apps with shared library , it's not fine. but I must
use shared library.

My library is something about image routine(contains mmx inline assembly).

This code is inline assem sample
Code:
extern const short tab_row[];
extern const short tab_col[];
img_mmx(short* blk)
{
asm volatile(
....
 :
 :"m"(blk), "m"(*tab_row), "m"(*tab_col)
 :"memory"
);
);

}

This is check result with nm :
------------------------------------------------
with -fPIC
Code:
           U _GLOBAL_OFFSET_TABLE
....000  T __i686.get_pc_thunk.bx
....000  T __i686.get_pc_thunk.cx
....324  T img_mmx
           U tab_row
           U tab_col

no -fPIC
Code:
....324  T img_mmx
           U tab_row
           U tab_col
-------------------------------------------------------

compile with gcc3.3.1

I think this problem is about memory reallocation. How do i solve it?
Anyone have a similar problem with this?

thanks in advance
 
D

Dan Pop

In said:
When I make shared library with option -fPIC, the result is wrong and
different
that made static library.

What was your C language question? In your opinion, what did they create
gnu.gcc.help for?

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top