<div dir="ltr"> Hi,<br> There are three macro(DEFINE, BLANK, OFFSET) contained in /linux/kbuild.h in kernerl version 2.6.32.60. All of them are inline assembly statements. I don't know what they means. Could anyone please explain them to me. <br>
Also I have written a test module to watch what they will print or do something, however I failed. I couldn't compile it .<br>Here is my code, I just steal it from arch/x86/kernel/asm-offsets_32.c:<br>#define PZ 4096 <br>
static int __init test_init(void)<br>{<br> DEFINE(PZ_asm, PZ);<br> BLANK();<br> OFFSET(INODE, inode, i_hash);<br> return 0;<br>}<br>And here is message when I compiled it:<br>/home/kiongf/kernel_module_test/test/test.c: Assembler messages:<br>
/home/kiongf/kernel_module_test/test/test.c:13: Error: junk at end of line, first unrecognized character is `-'<br>/home/kiongf/kernel_module_test/test/test.c:14: Error: junk at end of line, first unrecognized character is `-'<br>
/home/kiongf/kernel_module_test/test/test.c:15: Error: junk at end of line, first unrecognized character is `-'<br><br>Did I do something wrong? <br><br>Thanks.<br></div>