Solved

warning: creating a DT_TEXTREL in object.

Posted on 2009-04-02
3
2,173 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

809 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