From: shengyong <shengyong1@huawei.com>
To: mmarek@suse.cz
Cc: linux-kbuild@vger.kernel.org, sam@ravnborg.org
Subject: Question: "genksyms: Track changes to enum constants" doesn't work
Date: Wed, 11 Mar 2015 12:24:28 +0800 [thread overview]
Message-ID: <54FFC37C.8030505@huawei.com> (raw)
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
next reply other threads:[~2015-03-11 4:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 4:24 shengyong [this message]
2015-03-12 8:17 ` Question: "genksyms: Track changes to enum constants" doesn't work Michal Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54FFC37C.8030505@huawei.com \
--to=shengyong1@huawei.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox