[LLVMbugs] [Bug 9780] New: [Win32] constant may be emitted to .rdata

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 22 00:44:13 PDT 2011


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

           Summary: [Win32] constant may be emitted to .rdata
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: geek4civic at gmail.com
                CC: llvmbugs at cs.uiuc.edu


For Win32 targets, constant tends to be emitted to .data, not to .rdata.

const char a[] = "Hello.";

@a = constant [7 x i8] c"Hello.\00", align 1

* MSVC(x64)
PUBLIC  a
CONST   SEGMENT         ;2 .rdata        00000007
a       DB      'Hello.', 00H
CONST   ENDS

* mingw32-gcc 4.4
.globl _a
        .section .rdata,"dr"
_a:
        .ascii "Hello.\0"

* {i686|x86_64}-mingw32-{clang, llc}
        .data
        .globl  _a                      # @a
_a:
        .asciz   "Hello."

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