Compile error: arch/x86/kernel/entry_32.S:1422: Error: .size expression does not evaluate to a constant
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
2.6.38-rc6 compiled just fine, 2.6.38-rc7, -rc8 and the released 2.6.38 all got this error, with gcc 4.4 and after Debian Unstable updated to gcc 4.5:
arch/x86/kernel/entry_32.S: Assembler messages:arch/x86/kernel/entry_32.S:1422: Error: .size expression does not evaluate to a constant make[3]: *** [arch/x86/kernel/entry_32.o] Error 1
I searched for this error and saw this had been posted to the LKML:
http://www.gossamer-threads.com/lists/linux/kernel/1347760
This was when the error happened in -rc7, but it was not fixed for -rc8 or the released stable.
I'm just a user, not a developer, but I figure if its happening to me with very generic tools it may be happening to other people who don't use git, who don't apply patches, and such.
I don't have the warewithall to subscribe to the LKML, so I would be obliged if you would copy me on any replies. I would be glad to supply any further information if needed.
Curt-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBTYKAEy9Y35yItIgBAQKijQf9EMM/9GhAc8q20ANAfiNmWFjkxNLGmpMr oTg0pTs07YHF/TNmbTH65OP4nI7uLTEKBD+LLZ0xy5GIqEdFi0rjLKf1SIp0qLbu 4jWicMrhd4gN/FijJl/BoYEJ+LiRYNtZcySVr1p9TCmh0IBsWbMpM05sxBCvHBIg EzMKhYHIQ/h24gsTpLqrWE2pv/BjFofzb6rzNkAuzG6PVlcBsdbRjBDhTriQgZeO krtOMPQHGX3ZMYkpNqIwHvf6nVlVUhMQlOLs/Uuii//N2Rke38/a35NN+XlywcC7 bok2n0frIMxoaYzGezGlFXRYpjImRe9DrmlOr4xeiafFkBNaLLMxFw== =VOjl
-----END PGP SIGNATURE-----
Quoted 14 lines · Curt Howland
-----BEGIN PGP SIGNED MESSAGE-----
arch/x86/kernel/entry_32.S: Assembler messages:arch/x86/kernel/entry_32.S:1422: Error: .size expression does not evaluate to a constant make[3]: *** [arch/x86/kernel/entry_32.o] Error 1I searched for this error and saw this had been posted to the LKML:
http://www.gossamer-threads.com/lists/linux/kernel/1347760
This was when the error happened in -rc7, but it was not fixed for -rc8 or the released stable.
Quoted 7 lines
I'm just a user, not a developer, but I figure if its happening to me with very generic tools it may be happening to other people who don't use git, who don't apply patches, and such.
I don't have the warewithall to subscribe to the LKML, so I would be obliged if you would copy me on any replies. I would be glad to supply any further information if needed.
Thanks for reporting. This is a known problem. Unfortunately, it is due to the new binutils (version 2.21) that decided to make something that it use to ingore into something that is now an error.
The problem is that we have macros that create functions for us in assembly:
ENTRY(foo)
[ body of foo ]
END(foo)
But there also are some areas where we had a typo:
ENTRY(foo)
[ body of foo ]
END(xfoo)
binutils version 2.20 and before ignored this little bug. Version 2.21 now fails with the error you get.
Sure we can go about fixing this bug, but because of this stupid decision by the developers of binutils, older kernels will no longer build. The correct thing for them to have done, was just to make it into a warning and not fail the entire build.
-- Steve
Patch: Re: Compile error: arch/x86/kernel/entry_32.S:1422: Error: .size expression does not evaluate to a constant
In reply to Curt Howland-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 17 March 2011, Curt Howland was heard to say:
Quoted 8 lines
2.6.38-rc6 compiled just fine, 2.6.38-rc7, -rc8 and the released 2.6.38 all got this error, with gcc 4.4 and after Debian Unstable updated to gcc 4.5:
arch/x86/kernel/entry_32.S: Assembler messages:arch/x86/kernel/entry_32.S:1422: Error: .size expression does not evaluate to a constant make[3]: *** [arch/x86/kernel/entry_32.o] Error 1
This fixes the problem. The file does not have a maintainer listed, so I don't know where else to send it than to the LKML. Please correct me or redirect as needed.
- --- entry_32.S.original 2011-03-18 08:21:51.000000000 -0400
+++ entry_32.S 2011-03-20 10:37:00.000000000 -0400
@@ -343,7 +343,7 @@
# int/exception return? jne work_pending jmp restore_all - -END(ret_from_exception) +END(resume_userspace)
#ifdef CONFIG_PREEMPT
ENTRY(resume_kernel)
@@ -1413,7 +1413,7 @@
CFI_ADJUST_CFA_OFFSET 4
jmp error_code
CFI_ENDPROC
- -END(apf_page_fault)
+END(async_page_fault)
#endif
/*
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBTYYXSS9Y35yItIgBAQJMRwf+MUIRl9ALi04X23ano0jd0pQCwOPHXToU OfLQLyuJLvUkX1a5guAZhB4Id855r4e4fZnMHZpq47oxWgDy/wkXzZKo0dCYkmS0 a2Myzli4p5qNUUlROLJGvllNAzUL6+2+1w/1IpNfwSnTtfj6V0lzHWlxjYrFh3Kg yJ5S3tuS993ORX6Obd7l/CzO6AIRKiZLqXbNUDwXLJvv+w8rfUsUY0EjZlpeWJr0 4FjliC1k1ZJc8Z4LVKzQjOUQMpAp1KU6e6JKht2xOggWRcs6CIMBH+nDg4/CG0uJ R3bVj6Z1ydnT7vrOCrDyHhZRCSjKSeOw/+xxzeYZrBYCDP6z52VXJg== =S8vn
-----END PGP SIGNATURE-----