LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2006, 02:49 PM   #1
ashlesha
Member
 
Registered: May 2005
Location: PA
Distribution: Ubuntu
Posts: 204

Rep: Reputation: 30
Question PIC files/library?


What are PIC libraries? Googling this topic doesnt give an idea about what PIC libraries do!

I m getting the following error from my compiler:

Quote:
linking PIC files with non-PIC files
so need to figure out what it means..

Thanks,
Ashlesha.
 
Old 11-08-2006, 03:13 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
PIC stands for "position independent code", and is used in shared libraries. When you build part of the program, you can instruct gcc to generate PIC code using the -fpic option. I don't claim to fully understand exactly what it's doing, but for what it's worth, here's what the gcc documentation says about it:

Quote:
-fpic
Generate position-independent code (PIC) suitable for use in a shared library, if supported for the target machine. Such code accesses all constant addresses through a global offset table (GOT). The dynamic loader resolves the GOT entries when the program starts (the dynamic loader is not part of GCC; it is part of the operating system). If the GOT size for the linked executable exceeds a machine-specific maximum size, you get an error message from the linker indicating that -fpic does not work; in that case, recompile with -fPIC instead. (These maximums are 16k on the m88k, 8k on the Sparc, and 32k on the m68k and RS/6000. The 386 has no such limit.)
From the error message I think it's not possible to link PIC code with non-PIC code, r at least that there are som limitations on how it can work. What are you trying to build?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need library files Tavassoli Linux - Software 3 06-15-2006 08:39 AM
looking for library files Bob Moore Linux - Software 3 08-27-2004 05:30 PM
Library files for libkcm_ktalkd.la? ptht84 Linux - General 1 05-28-2004 09:19 AM
Library Files for pthread_create() khokhar Programming 3 02-02-2004 11:39 AM
Library files agp Linux - Software 3 12-17-2002 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration