Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <9e9109705082614586e24d3ea@mail.gmail.com> Date: Fri, 26 Aug 2005 14:58:46 -0700 From: Amos Anderson Reply-To: amosa AT caltech DOT edu To: Cygwin List Subject: Re: base relocations and vtune In-Reply-To: <9e910970508261456615ed711@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <9e9109705082610152a21d62b AT mail DOT gmail DOT com> <6 DOT 2 DOT 1 DOT 2 DOT 0 DOT 20050826142958 DOT 03d8a610 AT pop DOT prospeed DOT net> <9e9109705082612541a96c86c AT mail DOT gmail DOT com> <9e910970508261456615ed711 AT mail DOT gmail DOT com> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j7QLwxGH007248 well, i've just figured out my problem. i'm pretty sure that i had already tried the -pie command with the gcc compiler before, but that didn't work. here is the final solution that works for me. gcc needs the following two extra parameters: -Wl,-pie -pie thanks! amos. p.s. vtune likes the -gstabs and -g3 parameters too. > On 8/26/05, Amos Anderson wrote: > > thanks for responding. > > > > > > For intel's vtune to be able to provide call graph functionality, it > > claims to require "base relocations". upon presenting this warning, it > > suggests that if one is using the visual studio compiler, that the > > /FIXED:NO flag be provided to the compiler. microsoft's msdn has this > > to say on the subject: > > > > http://msdn2.microsoft.com/library/w368ysh2(en-us,vs.80).aspx > > > > which explains that /FIXED:NO will "generate a relocation section in > > the program" and that this flag is the default when building a DLL, > > but not default for any other project type. this is a topic that I do > > not understand short of putting english words together... > > > > how do i "generate a relocation section" for a random program that i'm > > trying to build on my own? i'm not trying to build a dll... just a > > command line executable (if that's different...). > > > > i'll try that ld command and see if it makes a difference... > > > > thanks! > > > > amos. > > > > On 8/26/05, Larry Hall < lh-no-personal-replies-please AT cygwin DOT com> wrote: > > > At 01:15 PM 8/26/2005, you wrote: > > > >hello -- i'm trying to figure out how to profile my code compiled with > > > >gcc/cygwin with intel vtune's call graph. > > > > > > > >this might be a problem specific to the call graph functionality itself. > > > > > > > >i was able to instrument all my program with vtune so i can run the > > > >call graph activity, but i get the warning "Module does not contain > > > >base relocations." a popup message informs me about the /fixed:no > > > >change for use with visual studio -- but i've been unable to find an > > > >analogous makefile modification for gcc/cygwin. > > > > > > > >when i run the call graph activity on my executables, it runs just > > > >fine, but none of my functions show up in the call list. only system > > > >dll functions show up -- and the graph attempts to build a tree out of > > > >cygwin1.dll, kernel32.dll, et al. > > > > > > > >by searching i found the "GCC for Windows help" thread, which seems to > > > >touch on this issue > > > > http://sourceware.org/ml/cygwin/2003-05/msg00436.html > > > >but i don't understand what they're talking about (i don't know what > > > >"base relocations" themselves are...) > > > > > > > >i would appreciate any guidance on this topic. > > > > > > > > > You haven't really given much detail of what you're trying to do and > > > where you see problems. Based on the minimal information above, I'm > > > going to guess that the problem is with your own DLL (since you imply > > > other system and Cygwin DLLs don't have a problem and don't give you > > > the warning.) If that's the case, I suggest you use the User's Guide > > > section on building DLLs as a guide: > > > > > > < http://cygwin.com/cygwin-ug-net/dll.html#dll-build> > > > > > > If you're having a problem because other DLLs you're using collide with > > > the default base image address of your DLL, you can specify a different > > > base address when you build your DLL by using the '--enable-auto-image-base' > > > switch of 'ld'. See the man page for more details. > > > > > > > > > > > > -- > > > Larry Hall http://www.rfk.com > > > RFK Partners, Inc. (508) 893-9779 - RFK Office > > > 838 Washington Street (508) 893-9889 - FAX > > > Holliston, MA 01746 > > > > > > > > > > > > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/