This is the mail archive of the
mailing list for the binutils project.
Re: Smpeg MMX asm compilation (problem)
Soul Studios wrote:
how do you call macros in GNU as?- I've tried copying examples from the
net but gas complains about the syntax.
Or do I need to be running the file through GCC instead to use the
Macros and defines are different things. I may have lead you
to believe they are the same. Macros are handled by gas, but
the #defines need to be ran through by a preprocessor.
Since the file you are porting already has some #defines in it,
the build system that project is using must be already taking care
But yes, the easiest way is to call the gcc driver on it. If the
file extension is ".S" (uppercase), it knows it has to call
the preprocessor, and then call the assembler.
A few more questions:
What is .Lfe1?
Is it a register, a function call?
A local label. If I remember correctly, i386 mingw/cygwin
uses "L" as local label prefix, while elf usually uses ".L" prefix.
I suggest using a define for this too:
# define LSYM(S) . ## S
# define LSYM(S) S
Is there a table somewhere for all the different "@" types and their
respective int's (ie @object, @function, etc)?
And I'm now looking at
which's even more complicated. How do I go about converting something
I am absolutely astounded at the lack of documentation on this stuff, on
the web- usually when I'm researching something I can google it in about
15 minutes, even when it's relatively obscure-
but pages on differences between COFF/PE & ELF syntax are naught, and
COFF pages seem scarce- any useful URL's you have would be... useful?
Simplified example, from code found in some places in gnu sources:
# define TYPE(x) .type x,@function
# define SIZE(x) .size x, . - x
# define TYPE(x) .def x; .scl 2; .type 32; .endef
# define SIZE(x)