Question: "genksyms: Track changes to enum constants" doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Michal Marek

The commit e37ddb8250 ("genksyms: Track changes to enum constants") helps to changes the
checksum of export symbol if an enum is changed. I test this agains linux-next, but it
seems that it does not work well.

	#include <linux/module.h>
	#include <linux/kernel.h>
	#include <linux/init.h>

	enum a {
		E1,
		E2,
		E_MAX
	};

	struct s {
		int a[E_MAX];
	};

	int test(struct s *s)
	{
		s->a[E2] = 0;
		return 0;
	}
	EXPORT_SYMBOL(test);
	
	static int __init hello_init(void) { return 0; }
	static void __exit hello_exit(void) { return; }
	module_init(hello_init);
	module_exit(hello_exit);

After compiled, I get:
$ cat Module.symvers
*0xb6ca7216*	test	/home/test/module/hello	EXPORT_SYMBOL

Then add an "E3" in the enum:

	enum a {
		E1,
		E2,
	+	E3,
		E_MAX
	};

After compiled, I still get:
$ cat Module.symvers
*0xb6ca7216*	test	/home/test/module/hello	EXPORT_SYMBOL

Anything wrong with my test?

thanks,
Sheng

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux