wat is the errr

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
aztex
Member
Member
Posts: 30
Joined: Sun Mar 02, 2008 8:15 am

wat is the errr

Post by aztex »

# reserve initial kernel stack space
.set STACKSIZE, 0x4000 # that is, 16k.
.comm stack, STACKSIZE, 32 # reserve 16k stack on a quadword boundary


gcc says error at end of the line , first unrecogonised character
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

honestly i know nothing about this, but normally, there are not 2 commas for one instruction, is it possible that the last instruction should only have one?

maybe:

Code: Select all

.comm stack, STACKSIZE 32
or

Code: Select all

.comm stack STACKSIZE, 32
User avatar
Zenith
Member
Member
Posts: 224
Joined: Tue Apr 10, 2007 4:42 pm

Post by Zenith »

No, the two commas are right for GAS.

Which line generates the error? And are you sure you're compiling this as an Assembly file (.s/.S)?
"Sufficiently advanced stupidity is indistinguishable from malice."
User avatar
aztex
Member
Member
Posts: 30
Joined: Sun Mar 02, 2008 8:15 am

Post by aztex »

the second line gives error..
User avatar
Zenith
Member
Member
Posts: 224
Joined: Tue Apr 10, 2007 4:42 pm

Post by Zenith »

Also remember that the third operand is only recognized when compiling to ELF.

For another executable format, try:

Code: Select all

# reserve initial kernel stack space
.set STACKSIZE, 0x4000 # that is, 16k.
.align 32
.comm stack, STACKSIZE # reserve 16k stack on a quadword boundary 
and see if that works.
"Sufficiently advanced stupidity is indistinguishable from malice."
Post Reply