From owner-freebsd-hackers Fri Nov 12 11:19:59 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 9B14814BCE for ; Fri, 12 Nov 1999 11:19:54 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id MAA05327; Fri, 12 Nov 1999 12:19:53 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id MAA18365; Fri, 12 Nov 1999 12:20:15 -0700 (MST) Message-Id: <199911121920.MAA18365@harmony.village.org> To: nate@mt.sri.com (Nate Williams) Subject: Re: Determining (after the fact) if a routine was compiled as PIC? Cc: hackers@FreeBSD.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> Date: Fri, 12 Nov 1999 12:20:15 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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