Linked Questions

151 votes
2 answers
159k views

How will it change the code, e.g. function calls?
osgx's user avatar
  • 95.3k
27 votes
2 answers
26k views

I would like to disable address space layout randomization (ASLR) on my system (Ubuntu Gnu/Linux 2.6.32-41-server), but, if I use sysctl -w kernel.randomize_va_space=0 the change would affect all ...
Amittai Aviram's user avatar
27 votes
2 answers
14k views

I read this post on PIC and it seems that it always be good to use PIC (whenever it is exe / static / share llibrary). So what are the disadvantages? Are there examples elaborating when not to use ...
Azil's user avatar
  • 467
6 votes
2 answers
8k views

I am trying to compile openssl but encountering an error. The CFLAGS in use are: -O2 -fPIC -fno-strict-overflow Can someone explain to me please what is .rodata and what the following sentence means? ...
shevy's user avatar
  • 1,030
8 votes
3 answers
22k views

I try to reference a static *.a library for my c++ project in CDT. I included it in C/C++ Build -> Cross C++ Linker -> Libraries But I get the error: relocation R_X86_64_32S against symbol ... ...
don-joe's user avatar
  • 600
0 votes
3 answers
7k views

Today, When trying to build my so lib project with mongodb c++ client, I got the error: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../libmongoclient.a(connection_factory.o): relocation ...
Dean Chen's user avatar
  • 3,898
8 votes
1 answer
18k views

What the -fpic flag does? I want to install a library (OpenSFM) and it is stated that it will need the Ceres Solver built and installed with the -fPIC compilation flag. The problem is I already ...
Hafiz Hilman Mohammad Sofian's user avatar
5 votes
2 answers
4k views

I have a sophisticated program for fitting nonlinear functions with the Levenberg-Marquardt's method. The program uses a solver for a system of linear Equations from the Lapack library, where I have ...
The Quantum Physicist's user avatar
12 votes
1 answer
16k views

Would someone please explain what the -fPIC option does. I can't seem to find references to it, yet I've seen it in use. I believe it has something to do with the memory allocation/space the ...
gone's user avatar
  • 1,149
2 votes
1 answer
5k views

I'm writing adapter (shared library) to some fpga API. I've got libsomelib.a and its API - somelibAPI.h. Here is a minimal example of my adapter: somelib_adapter.h: #include <string> ...
pingwindyktator's user avatar
2 votes
1 answer
5k views

I recently followed the instruction on this thread for compiling BLAS and LAPACK as pre-requisites to a SciPy installation. First I got a gfortran error at some point, which recommended that I re-...
user1953384's user avatar
  • 1,059
2 votes
2 answers
2k views

I've read the topic GCC -fPIC option So I've created my testlib.cpp. int foo(int num) { int result; if (num != 0) { result = 1; } else { result = 2; } ...
JenyaKh's user avatar
  • 2,558
4 votes
0 answers
4k views

If I don't use -fPIC flag while compiling a shared library, will it really matter? Will it affect the way loader loads it into process's address space?
Jack's user avatar
  • 761
0 votes
1 answer
2k views

If I want to create a static library for everyone to use, is it necessary compile it with -fPIC or -fPIE? It is working for me without -fPIC or -fPIE.
Samuel's user avatar
  • 851
2 votes
0 answers
4k views

I am currently reading "Modern CMake for C++" ([1]) and I am at page 193 where the concept of "position independent code" is explained. However it is only explained in one page and ...
RedBox's user avatar
  • 362

15 30 50 per page