On Tue, 2008-09-16 at 17:48 -0400, Pavel Roskin wrote:
$ nm iw | grep __cmd |sort
0000000000403d20 A __start___cmd
0000000000403d20 r __cmd_handle_infoNL80211_CMD_GET_WIPHYCIB_NONE
0000000000403d60 r __cmd_handle_infoNL80211_CMD_GET_WIPHYCIB_PHY
0000000000403da0 r __cmd_handle_nameNL80211_CMD_SET_WIPHYCIB_PHY
...
The next command is at 0x403d60, but the code expects it at 0x403d50.
I suspected as much, but right now I don't know how to fix that. I'd
have thought the rules here would be just like in an array but clearly I
was wrong.
This would probably "fix" it, but it's ugly:
--- a/iw.h
+++ b/iw.h
@@ -35,6 +35,7 @@ struct cmd {
int (*handler)(struct nl_cb *cb,
struct nl_msg *msg,
int argc, char **argv);
+ void *dummy[0] __attribute__((__aligned__(0x40)));
};
#define __COMMAND(sect, name, args, nlcmd, flags, idby, handler) \
johannes