OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Oct 21, 2017 3:44 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: .align causes GAS to fail assembly
PostPosted: Sun Aug 27, 2017 6:42 am 
Offline

Joined: Mon Oct 05, 2015 11:22 am
Posts: 9
Hi! I have recently tried to write and compile the example code on the wiki for Bare Bones, and have come across a problem. I tried to assemble start.S exactly as described in the tutorial with `as` also built exactly as described in the tutorial GCC Cross Compiler and the results I get are very confusing. Here is a text paste of the Cygwin window:

Code:
Noah Keck@NoahKeck-PC /cygdrive/c/Users/Noah Keck/Documents/GitHub/nos32
$ /cross/bin/i686-elf-as start.S -o start.o
start.S: Assembler messages:
start.S:9: Error: unknown pseudo-op: `.ailgn'

Noah Keck@NoahKeck-PC /cygdrive/c/Users/Noah Keck/Documents/GitHub/nos32
$ /cross/bin/i686-elf-as --version
GNU assembler (GNU Binutils) 2.26.1
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `i686-elf'.

Noah Keck@NoahKeck-PC /cygdrive/c/Users/Noah Keck/Documents/GitHub/nos32
$ /cross/bin/i686-elf-gcc --version
i686-elf-gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Noah Keck@NoahKeck-PC /cygdrive/c/Users/Noah Keck/Documents/GitHub/nos32
$


For the record, I built both binutils and gcc from scratch using the sources provided over at ftp.gnu.org, following exactly the build steps listed in GCC Cross Compiler on the wiki, which means that it correctly targets i686-elf. Am I missing something? What am I doing wrong? :?

P.S.: The line this fails on is in the `.multiboot` section, `.align 4`.

_________________
It won't take long if you take it one byte at a time.


Top
 Profile  
 
 Post subject: Re: .align causes GAS to fail assembly
PostPosted: Sun Aug 27, 2017 6:54 am 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 49
nkeck72 wrote:
start.S:9: Error: unknown pseudo-op: `.ailgn'
You have misspelled align


Last edited by MichaelPetch on Sun Aug 27, 2017 6:57 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: .align causes GAS to fail assembly
PostPosted: Sun Aug 27, 2017 6:56 am 
Offline

Joined: Mon Oct 05, 2015 11:22 am
Posts: 9
DOH! :oops:

Thank you. I really should implement a spell check at some point.

_________________
It won't take long if you take it one byte at a time.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: beyondsociety, hajdukcampus and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group