473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

inline assem problem with -fPIC gcc3.3.1

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
Expand|Select|Wrap|Line Numbers
  1. extern const short tab_row[];
  2. extern const short tab_col[];
  3. img_mmx(short* blk)
  4. {
  5. asm volatile(
  6. ....
  7. :
  8. :"m"(blk), "m"(*tab_row), "m"(*tab_col)
  9. :"memory"
  10. );
  11. );
  12.  
  13. }
  14.  
This is check result with nm :
------------------------------------------------
with -fPIC
Expand|Select|Wrap|Line Numbers
  1. U _GLOBAL_OFFSET_TABLE
  2. ....000  T __i686.get_pc_thunk.bx
  3. ....000  T __i686.get_pc_thunk.cx
  4. ....324  T img_mmx
  5. U tab_row
  6. U tab_col
  7.  
no -fPIC
Expand|Select|Wrap|Line Numbers
  1. ....324  T img_mmx
  2. U tab_row
  3. U tab_col
  4.  
-------------------------------------------------------

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
Nov 13 '05 #1
1 1684
In <bm**********@news1.kornet.net> "kscho" <ks***@tibetsystem.com> writes:
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
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
by: DJ WIce | last post by:
Hi all, I did make a script/css thing to replace the contextmenu on the website with a new one: http://www.djwice.com/contextmenu.html It works nice in MSIE, but on Netscape (and probable...
47
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
20
by: Grumble | last post by:
Hello everyone, As far as I understand, the 'inline' keyword is a hint for the compiler to consider the function in question as a candidate for inlining, yes? What happens when a function with...
7
by: Srini | last post by:
Hello, Rules for inline functions say that they have to be defined in the same compilation unit as their declarations. For class member functions this means that the inline member functions must...
12
by: sam_cit | last post by:
Hi Everyone, I have few questions on inline functions, when i declare a function as inline, is it for sure that the compiler would replace the function call with the actual body of the function?...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.