* Naked Functions
@ 2003-05-27 14:13 S kris
2003-05-27 14:29 ` André Wagner
2003-06-08 14:51 ` HLA v1.49 is now available Randall Hyde
0 siblings, 2 replies; 3+ messages in thread
From: S kris @ 2003-05-27 14:13 UTC (permalink / raw)
To: gcc; +Cc: linux-assembly
Hi,
I have come across some MS C code which uses 'naked' functions. How can I
achieve a similar effect with GNU toolchain. I do not want to rewrite the
code in assembly .s file and would prefer to do simple modifications to make
it work with Linux.
Is the macro __attribute__((naked)) valid for the above purpose?
If not, what are the methods to generate the code for functions without its
prolog and epilog code (naked functions) under Linux?
Is prolog and epilog code generated by both MS tools and GNU tools
(compilers) are same?
Please clarify the above queries.
Thanks in advance.
--Kris
_________________________________________________________________
Reconnect with old pals. Relive the happy times.
http://www.batchmates.com/msn.asp With just one click.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Naked Functions
2003-05-27 14:13 Naked Functions S kris
@ 2003-05-27 14:29 ` André Wagner
2003-06-08 14:51 ` HLA v1.49 is now available Randall Hyde
1 sibling, 0 replies; 3+ messages in thread
From: André Wagner @ 2003-05-27 14:29 UTC (permalink / raw)
To: linux-assembly
Hi,
I've read some time ago about how writing a full programm without the
headers. It's useful for write a boot sector for example, but I'm not sure
for functions. But you can use it as a start point...
Just compile your program like this:
gcc -c test.c
ld -o test -Ttext 0x0 -e main test.o
objcopy -R .note -R .comment -S -O binary test test.bin
HTH,
André
On Tue, 27 May 2003 19:43:59 +0530, S kris <kris_bs@hotmail.com> wrote:
> Hi,
>
> I have come across some MS C code which uses 'naked' functions. How can I
> achieve a similar effect with GNU toolchain. I do not want to rewrite the
> code in assembly .s file and would prefer to do simple modifications to
> make it work with Linux.
>
> Is the macro __attribute__((naked)) valid for the above purpose?
> If not, what are the methods to generate the code for functions without
> its prolog and epilog code (naked functions) under Linux?
> Is prolog and epilog code generated by both MS tools and GNU tools
> (compilers) are same?
>
> Please clarify the above queries.
>
> Thanks in advance.
>
> --Kris
>
> _________________________________________________________________
> Reconnect with old pals. Relive the happy times.
> http://www.batchmates.com/msn.asp With just one click.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-assembly"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
--
André Wagner
^ permalink raw reply [flat|nested] 3+ messages in thread
* HLA v1.49 is now available
2003-05-27 14:13 Naked Functions S kris
2003-05-27 14:29 ` André Wagner
@ 2003-06-08 14:51 ` Randall Hyde
1 sibling, 0 replies; 3+ messages in thread
From: Randall Hyde @ 2003-06-08 14:51 UTC (permalink / raw)
To: S kris, gcc; +Cc: linux-assembly
Hi all,
HLA v1.49 is now available from the Webster download page
(http://webster.cs.ucr.edu).
HLA is the High Level Assembler for 80x86 processors. It runs under
Linux and Windows. Carefully written programs are portable between
the two OSes.
Lots of new sample code, lots of changes to the standard library,
and a few bug fixes. Also, both Windows and Linux versions of the
compiler are available with this release.
Big change: the new console routines are integrated into the standard
library (portable between Linux and Windows).
This will probably break existing applications that use the console
library routines. The older routines are available for
separate linking to maintain compatibility.
New Iczelion conversions.
New "Windows Programming in Assembly (WPA) examples.
Plus more!
Enjoy!
Randy Hyde
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-06-08 14:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-27 14:13 Naked Functions S kris
2003-05-27 14:29 ` André Wagner
2003-06-08 14:51 ` HLA v1.49 is now available Randall Hyde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).