[LLVMbugs] [Bug 21501] New: .org confused by .align

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Nov 6 05:24:55 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21501

            Bug ID: 21501
           Summary: .org confused by .align
           Product: new-bugs
           Version: 3.4
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: rth at twiddle.net
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The assembler is attempting to resolve expressions before resolving alignment.

$ cat z.S
0:
    .org    0b + 3, 0x90
    .align    8
    .org    0b + 11, 0x90
$ cc -c z.S
z.S:4:7: error: expected assembly-time absolute expression
 .org 0b + 11, 0x90

Note that this works with gas:

$ as -o z.o z.S
$ objdump -dr z.o

z.o:     file format elf64-x86-64-freebsd


Disassembly of section .text:

0000000000000000 <.text>:
   0:    90                       nop
   1:    90                       nop
   2:    90                       nop
   3:    0f 1f 44 00 00           nopl   0x0(%rax,%rax,1)
   8:    90                       nop
   9:    90                       nop
   a:    90                       nop

$ as --version
GNU assembler (GNU Binutils) 2.24
Copyright 2013 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 `x86_64-portbld-freebsd10.0'.
$ cc --version
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.1
Thread model: posix

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141106/05ab2727/attachment.html>


More information about the llvm-bugs mailing list