Link to home
Start Free TrialLog in
Avatar of letharion
letharionFlag for Sweden

asked on

warning: creating a DT_TEXTREL in object.

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.
Avatar of jkr
jkr
Flag of Germany image

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-------------------------------
Avatar of letharion

ASKER

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 :)
ASKER CERTIFIED SOLUTION
Avatar of letharion
letharion
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial