Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Nov 1999 12:20:15 -0700
From:      Warner Losh <imp@village.org>
To:        nate@mt.sri.com (Nate Williams)
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Determining (after the fact) if a routine was compiled as PIC? 
Message-ID:  <199911121920.MAA18365@harmony.village.org>
In-Reply-To: Your message of "Fri, 12 Nov 1999 11:18:18 MST." <199911121818.LAA19728@mt.sri.com> 
References:  <199911121818.LAA19728@mt.sri.com>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199911121818.LAA19728@mt.sri.com> Nate Williams writes:
: Is there a way to look at a compiled file to see if it was compiled as
: PIC?  I've got some .o files that I don't have source code to, but
: before I throw them into a shlib, I need to know if they are legal to
: put into one?

You can likely look at the relocation section of the .o file to see
what relocations it has.  Naively I'd expect PIC code to have none.
objdump likely has some option that would prove useful.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911121920.MAA18365>