This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/50242] __attribute__((naked)) is not implemented on IA32 (x86)
- From: "congruwer at yahoo dot co.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Sep 2011 09:16:18 +0000
- Subject: [Bug target/50242] __attribute__((naked)) is not implemented on IA32 (x86)
- Auto-submitted: auto-generated
- References: <bug-50242-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50242
--- Comment #6 from congruwer at yahoo dot co.uk 2011-09-01 09:16:18 UTC ---
Why not? In any case, without inline it also doesn't work:
test.s: Assembler messages:
test.s:628: Warning: .type pseudo-op used outside of .def/.endef ignored.
test.s:628: Error: junk at end of line, first unrecognized character is `_'
test.s:629: Warning: .size pseudo-op used outside of .def/.endef ignored.
test.s:629: Error: junk at end of line, first unrecognized character is `_'
I've tried fixing the problem, but made no headway. I can get gas so swallow it
by copying what the C++ compiler emits for a function, but that just gives a
linker error later on:
test.cpp:16: undefined reference to `foobar()'
In any case, the function really should be inline... what now? Use sed to edit
the .s file? Will that preserve C++ line number information? (Debugging would
be a real pain if all the line numbers were shifted by a byte or two.)