[LLVMbugs] [Bug 1607] New: appending linkage global variable generates illegal assembly

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Aug 12 13:43:50 PDT 2007


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

           Summary: appending linkage global variable generates illegal
                    assembly
           Product: libraries
           Version: trunk
          Platform: Macintosh
               URL: http://lists.cs.uiuc.edu/mailman/private/hlvm-dev/Week-
                    of-Mon-20070806/000011.html
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: kroepke at classdump.org
                CC: llvmbugs at cs.uiuc.edu


When building HLVM on Darwin 8.10.1 (X86) the build fails with:

as -o default/hlvm/Runtime/hlvm_get_programs.o
default/hlvm/Runtime/hlvm_get_programs.s
default/hlvm/Runtime/hlvm_get_programs.s:15:Expected comma after segment-name
default/hlvm/Runtime/hlvm_get_programs.s:15:Rest of line ignored. 1st junk
character valued 32 ( ).

hlvm_get_programs.s contains:
     1
     2
     3          .text
     4          .align  4,0x90
     5          .globl  _hlvm_get_programs
     6  _hlvm_get_programs:
     7          movl    $_hlvm_programs, %eax
     8          ret
     9          .globl _hlvm_programs
    10          .literal8
    11
    12          .align  3
    13  _hlvm_programs:                         # hlvm_programs
    14          .space  8
    15  .section .drectve
    16          .ascii " -export:hlvm_programs,data"
    17
    18          .subsections_via_symbols
    19

Line 15 should read (note the trailing comma):
.section .drectve,

Adding the comma causes a clean assemble.

On Linux the assembly file is legal and contains (supplied by Reid via mail):
        .globl hlvm_programs
        .bss
        .align  8
hlvm_programs:                          # hlvm_programs
        .size   hlvm_programs, 8
        .zero   8
.section .drectve
        .ascii " -export:hlvm_programs,data"


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list