This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld -shared -pie revisited


On Sat, Oct 3, 2009 at 8:09 PM, Daniel Jacobowitz <drow@false.org> wrote:
> All you need to create something you can load or run should be -pie.

Oh, wow.  The solution was much simpler than I thought!  Thanks for
the fast response!

> If you find that symbols you need are missing, use -rdynamic.

How would I know when to use this, other than trial and error?  I
would like to learn more.

> However, symbol binding and access to global variables will be a bit
> weird; it will be bound like an executable so it will not necessarily
> search the 'real' executable or other shared libraries.

I'm sorry, I don't understand.  Could you explain further, or provide
an example?  Also, does this statement apply to the use of -rdynamic,
or to PIE executables in general?

While I'm asking questions, is -fPIC required in addition to -fPIE, or
does the latter imply the former?

--
Mark Lodato


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]