This is the mail archive of the
mailing list for the GCC project.
Re: Patch for "no_instrument_function" attribute
On Wed, Dec 19, 2001 at 07:06:02AM +0100, Andreas Jaeger wrote:
> Will Cohen <email@example.com> writes:
> > I just eyeballed the results; I didn't write the test as a complete
> > dejagnu test. I haven't addressed the issues to make this an automated
> > test. This would be just a compile test, but not all target supports
> > profiling. The test isn't tied to a particular architecture, but rather
> > the support of profiling. The test also need to look at the output of
> > compiler to determine whether the generation of profiling calls has been
> > suppressed. I have attached the test program, no_inst.c, to this mail. I
> > am open to suggestions on how to adapt this code, so that this attribute
> > feature is automatically tested.
> I fear for such tests we need to run the object file through objdump.
> Currently no such framework exists in GCC and therefore we can't
> really do such testing. :-(
Actually, it should be fairly easy to do this as a link test, shouldn't
it? Compile a file with -finstrument_functions, and it should fail to
link if you don't provide the instrumentation. If every function in
the file is marked with no_instrument_function, then it should link.
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer