Large number of gas warnings compiling linux kernel....

Alan Modra
Tue Jun 6 16:55:00 GMT 2000

On Tue, 6 Jun 2000, Nick Clifton wrote:

> in gcc/config/arm/linux-elf.h).  There is (rather grungy) workaround
> however - put a comment character at the end of the section's name
> when defining the attribute:
>   const char __module_kernel_version[] __attribute__((section(".modinfo\n\t#"))) =
>   "kernel_version=2.2.14";

I like it!  It should work on any architecture that the linux kernel
supports too, as `#' is in either comment_chars[] or line_comment_chars[].
In fact the only gas target that this trick will fail on is tic30.

BTW, Scott you can blame me for adding these warnings.  See for a good reason why
gas should warn.

Regards, Alan Modra
Linuxcare.  Support for the Revolution.

More information about the Binutils mailing list