<html lang="en"> <head> <title>Sparc-Aligned-Data - Using as</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Using as"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Sparc_002dDependent.html#Sparc_002dDependent" title="Sparc-Dependent"> <link rel="prev" href="Sparc_002dOpts.html#Sparc_002dOpts" title="Sparc-Opts"> <link rel="next" href="Sparc_002dSyntax.html#Sparc_002dSyntax" title="Sparc-Syntax"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- This file documents the GNU Assembler "as". Copyright (C) 1991-2015 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="Sparc-Aligned-Data"></a> <a name="Sparc_002dAligned_002dData"></a> <p> Next: <a rel="next" accesskey="n" href="Sparc_002dSyntax.html#Sparc_002dSyntax">Sparc-Syntax</a>, Previous: <a rel="previous" accesskey="p" href="Sparc_002dOpts.html#Sparc_002dOpts">Sparc-Opts</a>, Up: <a rel="up" accesskey="u" href="Sparc_002dDependent.html#Sparc_002dDependent">Sparc-Dependent</a> <hr> </div> <h4 class="subsection">9.42.2 Enforcing aligned data</h4> <p><a name="index-data-alignment-on-SPARC-2012"></a><a name="index-SPARC-data-alignment-2013"></a>SPARC GAS normally permits data to be misaligned. For example, it permits the <code>.long</code> pseudo-op to be used on a byte boundary. However, the native SunOS assemblers issue an error when they see misaligned data. <p><a name="index-g_t_002d_002denforce_002daligned_002ddata-2014"></a>You can use the <code>--enforce-aligned-data</code> option to make SPARC GAS also issue an error about misaligned data, just as the SunOS assemblers do. <p>The <code>--enforce-aligned-data</code> option is not the default because gcc issues misaligned data pseudo-ops when it initializes certain packed data structures (structures defined using the <code>packed</code> attribute). You may have to assemble with GAS in order to initialize packed data structures in your own code. <p><a name="index-SPARC-syntax-2015"></a><a name="index-syntax_002c-SPARC-2016"></a> </body></html>