DT_TEXTREL
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > DT_TEXTREL




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    DT_TEXTREL  
Ykstort


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 12:23 AM

When I compile a module liek this:
gcc -shared -fPIC -o foobarbaz.so foo.o bar.o baz.o
I get this:
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld:
warning: creating a DT_TEXTREL in object.






[ Post a follow-up to this message ]



    Re: DT_TEXTREL  
Frank Cusack


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 06:31 AM

On 12 Jun 2006 17:07:24 -0700 "Ykstort" <ykstortionist@gmail.com> wrote:
> When I compile a module liek this:
> gcc -shared -fPIC -o foobarbaz.so foo.o bar.o baz.o
> I get this:
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld:
> warning: creating a DT_TEXTREL in object.

cool.





[ Post a follow-up to this message ]



    Re: DT_TEXTREL  
Ykstort


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 06:31 AM


Frank Cusack wrote:
> On 12 Jun 2006 17:07:24 -0700 "Ykstort" <ykstortionist@gmail.com> wrote: 
>
> cool.
0.o
What kind of useless comment is that ?
Maybe I should have been clearer when I started the topic: why do I get
that warning and is it bad ?






[ Post a follow-up to this message ]



    Re: DT_TEXTREL  
Paul Pluzhnikov


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 06:31 AM

"Ykstort" <ykstortionist@gmail.com> writes:

> Frank Cusack wrote: 
> 0.o
> What kind of useless comment is that ?

It rather fits the original post.

> Maybe I should have been clearer when I started the topic: why do I get
> that warning

You probably didn't compile foo.o, bar.o or baz.o with -fPIC like
you should have.

> and is it bad ?

Probably. DT_TEXTREL likely means that you have .text relocations
remaining, which will make your DSO "unsharead" as soon as it is
loaded into a process address space.

On some platforms (e.g. SPARC, x86_64) the linker will flat refuse
to build DSO from non-PIC code. On x86 the linker allows this.

This is the first time I see a warning about it. Which version of
linker produced that warning?

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.





[ Post a follow-up to this message ]



    Re: DT_TEXTREL  
Ykstort


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 06:31 AM


Paul Pluzhnikov wrote:
> "Ykstort" <ykstortionist@gmail.com> writes:
> 
>
> It rather fits the original post.
> 
>
> You probably didn't compile foo.o, bar.o or baz.o with -fPIC like
> you should have.
> 
>
> Probably. DT_TEXTREL likely means that you have .text relocations
> remaining, which will make your DSO "unsharead" as soon as it is
> loaded into a process address space.
>
> On some platforms (e.g. SPARC, x86_64) the linker will flat refuse
> to build DSO from non-PIC code. On x86 the linker allows this.
>
> This is the first time I see a warning about it. Which version of
> linker produced that warning?
Well I'm using -fPIC
It's gcc version 3.4.6-r1
>
> Cheers,
> --
> In order to understand recursion you must first understand recursion.
> Remove /-nsp/ for email.






[ Post a follow-up to this message ]



    Re: DT_TEXTREL  
Paul Pluzhnikov


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 06:31 AM

"Ykstort" <ykstortionist@gmail.com> writes:

> Well I'm using -fPIC

Not likely. We can see that you use -fPIC at link time (when it
doesn't matter); but are you using it at *compile* time?

> It's gcc version 3.4.6-r1

You continue the pattern of supplying minimal and wrong info,
and you are unlikely to get good answers because of that.

I asked you: "which version of *linker* produced the warning?"
The version of gcc is irrelevant. Perhaps you don't understand
the difference between linker and compiler?

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.





[ Post a follow-up to this message ]



    Re: DT_TEXTREL  
Ykstort


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 06:31 AM


Paul Pluzhnikov wrote:
> "Ykstort" <ykstortionist@gmail.com> writes:
> 
>
> Not likely. We can see that you use -fPIC at link time (when it
> doesn't matter); but are you using it at *compile* time?

Oh you need it when you compile too ?
That would explain it then
> 
>
> You continue the pattern of supplying minimal and wrong info,
> and you are unlikely to get good answers because of that.
>
> I asked you: "which version of *linker* produced the warning?"
> The version of gcc is irrelevant. Perhaps you don't understand
> the difference between linker and compiler?

Although it no longer matters as compiling with -fPIC fixed the
problem, it was GNU ld version 2.16.1
Sorry about the confusion
>
> Cheers,
> --
> In order to understand recursion you must first understand recursion.
> Remove /-nsp/ for email.






[ Post a follow-up to this message ]



    Re: DT_TEXTREL  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 12:31 PM

In article <1150180260.975427.192290@u72g2000cwu.googlegroups.com>,
"Ykstort" <ykstortionist@gmail.com> wrote:

> Paul Pluzhnikov wrote: 
>
> Oh you need it when you compile too ?

When else would you need it?  -fPIC means "generate position-independent
code".  Since only the compiler generates code, it's meaningless any
other time.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:26 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register