OSDev.org
https://forum.osdev.org/

.align causes GAS to fail assembly
https://forum.osdev.org/viewtopic.php?f=1&t=32376
Page 1 of 1

Author:  nkeck72 [ Sun Aug 27, 2017 6:42 am ]
Post subject:  .align causes GAS to fail assembly

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`.

Author:  MichaelPetch [ Sun Aug 27, 2017 6:54 am ]
Post subject:  Re: .align causes GAS to fail assembly

nkeck72 wrote:
start.S:9: Error: unknown pseudo-op: `.ailgn'
You have misspelled align

Author:  nkeck72 [ Sun Aug 27, 2017 6:56 am ]
Post subject:  Re: .align causes GAS to fail assembly

DOH! :oops:

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

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/