Solved

warning: creating a DT_TEXTREL in object.

Posted on 2009-04-02
3
2,090 Views
Last Modified: 2012-05-06
I usually do everything I can to keep errors out of my compilation.
This one however been with my current project "forever", simply because I have no idea what to do about it.
Google doesn't reveal anything obvious either.

Any ideas what it is?

/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
0
Comment
Question by:letharion
  • 2
3 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 24052358
Actually, a simple Google search for 'DT_TEXTREL' comes up with quite a lot, e.g.

http://gcc.gnu.org/ml/gcc-help/2006-11/msg00390.html

--------------------->8-------------------------------

Helmut Jarausch <jarausch@igpm.rwth-aachen.de> writes:

> (I believe) I have clean C++ code but g++-4.1.1
> emits the following warning during generation of
> a dynamic library (on Linux)
>    warning: creating a DT_TEXTREL in object

This means that you are including an object in the shared library
which was compiled without the -fpic option.

--------------------->8-------------------------------

http://unix.derkeiler.com/Newsgroups/comp.unix.programmer/2005-06/0060.html

--------------------->8-------------------------------

Lukasz Wojtow <lw@ftw.zamosc.pl> writes:

> Hi,
> I get this warning when compilling a module:
>
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld:
> warning: creating a DT_TEXTREL in object.
>
> What is it and how can I get rid of it (except for linker option)?

Are you sure you need to get rid of it? Try compiling your code with
the -fPIC compiler flag.

--------------------->8-------------------------------
0
 
LVL 6

Author Comment

by:letharion
ID: 24057575
Thanks. have to admit I missed the first one of those, but have seem the second. (Curious, since we should have done the same search...)

The second answer however, didn't say much IMO, and I didn't consider it an answer. It sounded like "any random guess" to me.

The first one is quite interesting however. And it also gives more credit to the second option.

I'm gonna go read up on that option then.

Thank you jkr :)
0
 
LVL 6

Accepted Solution

by:
letharion earned 0 total points
ID: 24466316
Unfortunately, I'm not a lot wiser, and adding -fPIC doesn't remove the warning message.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
why should double free() crash? 7 30
List out all word 7 224
Problem to save 10 121
Should CArray be used for a list of pointers in C++? 19 89
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now