|When do I need PIC? firstname.lastname@example.org (joshc) (2006-07-28)|
|Re: When do I need PIC? email@example.com (Vincent Zweije) (2006-07-29)|
|Re: When do I need PIC? firstname.lastname@example.org (joshc) (2006-07-31)|
|Re: When do I need PIC? email@example.com (russell kym horsell) (2006-08-03)|
|Re: When do I need PIC? firstname.lastname@example.org (joshc) (2006-08-04)|
|Re: When do I need PIC? email@example.com (glen herrmannsfeldt) (2006-08-09)|
|Date:||4 Aug 2006 16:37:55 -0400|
|Posted-Date:||04 Aug 2006 16:37:55 EDT|
> Your original question has pretty much been answered. But maybe you
> really are asking the quetion "how can I tell whether my code is
> already position independent?".
No, I already said I can look at the assembler listing and can easily
tell if the compiler generated code that is position independent. That
wasn't quite my question, but...
> The best idea would probably be to create an edit script (e.g.) to look
> at the asm output and extract "features" (a la AI probs) that indicate
> the code is NOT position indep. E.g. sometimes "@$" or somesuch indicates
> a ref to an absolute address. Most (all?) refs to abs addrs indicate non-PIC
> code. But there are bound to be a load of tricks.
I thank you for this part of your response. That is the insight I was
looking for. I was looking for the "style of C code that results in
being PIC" most of the time but as you and previous posters mentioned
this is highly architecture dependent. And with that, my original
question has now been answered.
Return to the
Search the comp.compilers archives again.