[LLVMbugs] [Bug 22503] New: clang 3.6 -target i386-win32-pc can create invalid section attributes

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Feb 7 10:27:34 PST 2015


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

            Bug ID: 22503
           Summary: clang 3.6 -target i386-win32-pc can create invalid
                    section attributes
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: markus at oberhumer.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This is a strange issue - using "-save-temps" seems to influence the ".rdata"
section attributes, causing warning LNK4078.

A possible regression against clang-3.4.2.


$ cat test.c

static const char aa[] = "aa";
const char *a(void) { return aa; }
const char *b(void) { return "bb"; }

$ clang-3.6.0rc2 -target i386-win32-pc -Wall -o test1.obj -c test.c
$ lib.exe /nologo /out:test1.lib test1.obj

$ clang-3.6.0rc2 -target i386-win32-pc -Wall -save-temps -o test2.obj -c test.c
$ lib.exe /nologo /out:test2.lib test2.obj
test2.obj : warning LNK4078: multiple '.rdata' sections found with different
attributes (C0101040)

$  cmp -l test1.obj test2.obj
220 100 300

-- 
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/20150207/71aa5d9d/attachment.html>


More information about the llvm-bugs mailing list