Re: [PATCH] BUG preserve registers

From: H. Peter Anvin (hpa@zytor.com)
Date: Sun Feb 10 2002 - 02:13:13 EST


Linus Torvalds wrote:

>
> __BASE_FILE__ is not useful.
>
> Remember: when we have a BUG in a header file, we need to get the HEADER
> file, not the base file.
>
> __BASE_FILE__ only works for .c files.
>
> And .c files aren't the problem anyway (ie if we didn't have BUG()
> statements in header files, we wouldn't have problems anyway).
>

What we'd really like is something like:

/* foo.h */
#ifndef _FOO_H
#define _FOO_H
#define _FILE_REF __fileref_foo_h

[...]

#undef _FILE_REF
#endif /* _FOO_H */

... and have an automatically generated library (.a file) with all these
strings that could be pulled in as necessary -- but only one instance of
each. However, doing this without compiler support seems ugly in the
extreme.

Of course, if the linker would fold strings for us then it would be a
helluva lot easier...

        -hpa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:31 EST