On 10/13/15 22:56, Bernd Schmidt wrote: > On 10/13/2015 04:50 PM, Chen Gang wrote: >> OK, under the bugzilla, the maintainer treated it as expected behavior >> (not a bug). For me, we need more explanation for it (why we treat it >> as expected behavior). > > A global register is under control of the user. If the compiler uses it as a > frame pointer, it will get clobbered outside the user's control, which is > unexpected behaviour. Therefore, the code Mike quoted detects that case and > issues an error, indicating that you must use -fomit-frame-pointer if you > expect to use the frame pointer register for other purposes. >
OK, thanks. > If you want an address on the stack there's __builtin_frame_address which may > or may not do what was intended. The code quoted in the bugzilla is just > invalid. > OK, thank you very much, I shall send related kernel fix patch to kernel mailing list. Thanks. -- Chen Gang (陈刚) Open, share, and attitude like air, water, and life which God blessed