.align causes GAS to fail assembly

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
nkeck72
Posts: 9
Joined: Mon Oct 05, 2015 11:22 am
Libera.chat IRC: nkeck72

.align causes GAS to fail assembly

Post by nkeck72 »

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: Select all

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.
MichaelPetch
Member
Member
Posts: 799
Joined: Fri Aug 26, 2016 1:41 pm
Libera.chat IRC: mpetch

Re: .align causes GAS to fail assembly

Post by MichaelPetch »

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.
nkeck72
Posts: 9
Joined: Mon Oct 05, 2015 11:22 am
Libera.chat IRC: nkeck72

Re: .align causes GAS to fail assembly

Post by nkeck72 »

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.
Post Reply