<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - error LNK2017: 'ADDR32' relocation to '.debug_str' invalid without /LARGEADDRESSAWARE:NO"
href="http://llvm.org/bugs/show_bug.cgi?id=15393">15393</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>error LNK2017: 'ADDR32' relocation to '.debug_str' invalid without /LARGEADDRESSAWARE:NO
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows XP
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Driver
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>llvm@meinersbur.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Compiling any program using -g flag fails for target "x86_64-pc-win32"
<span class="quote">>type hello.c</span >
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("Hello World!");
return 0;
}
<span class="quote">>clang hello.c -o hello.exe -g -target "x86_64-pc-win32" -fno-exceptions -fno-cxx-exceptions -fno-use-cxa-atexit -v</span >
clang version 3.3
Target: x86_64-pc-win32
Thread model: posix
clang: warning: argument unused during compilation: '-fno-cxx-exceptions'
"C:/Users/Meinersbur/src/molly/build64_vc11/bin/Debug/clang.exe" -cc1 -triple
x86_64-pc-win32 -emit-obj -mrelax-all -disable-free -main-file-name hello.c
-mrelocation-model pic -p
ic-level 2 -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v -g
-resource-dir "C:/Users/Meinersbur/
src/molly/build64_vc11/bin/Debug\\..\\lib\\clang\\3.3" -internal-isystem
C:/Users/Meinersbur/src/molly/build64_vc11/bin/Debug/../lib/clang/3.3/include
-internal-isystem "C:\\Progra
m Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE" -internal-isystem
"C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\ATLMFC\\INCLUDE"
-internal-isystem "C:\\Prog
ram Files (x86)\\Windows Kits\\8.0\\include\\shared" -internal-isystem
"C:\\Program Files (x86)\\Windows Kits\\8.0\\include\\um" -internal-isystem
"C:\\Program Files (x86)\\Windows
Kits\\8.0\\include\\winrt" -ferror-limit 19 -fmessage-length 180
-mstackrealign -fno-use-cxa-atexit -fms-extensions -fms-compatibility
-fmsc-version=1300 -fdelayed-template-parsin
g -fobjc-runtime=gcc -fobjc-default-synthesize-properties
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o C:/Users/MEINER~1/AppData/Local/Temp/hel
lo-669244.o -x c hello.c
clang -cc1 version 3.3 based upon LLVM 3.3svn default target x86_64-pc-win32
#include "..." search starts here:
#include <...> search starts here:
C:/Users/Meinersbur/src/molly/build64_vc11/bin/Debug/../lib/clang/3.3/include
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\ATLMFC\INCLUDE
C:\Program Files (x86)\Windows Kits\8.0\include\shared
C:\Program Files (x86)\Windows Kits\8.0\include\um
C:\Program Files (x86)\Windows Kits\8.0\include\winrt
End of search list.
"C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/BIN/amd64/link.exe"
-out:hello.exe -defaultlib:libcmt -nologo
C:/Users/MEINER~1/AppData/Local/Temp/hello-669244.o
hello-669244.o : error LNK2017: 'ADDR32' relocation to '.debug_str' invalid
without /LARGEADDRESSAWARE:NO
hello-669244.o : error LNK2017: 'ADDR32' relocation to '.debug_str' invalid
without /LARGEADDRESSAWARE:NO
hello-669244.o : error LNK2017: 'ADDR32' relocation to '.debug_line' invalid
without /LARGEADDRESSAWARE:NO
hello-669244.o : error LNK2017: 'ADDR32' relocation to '.debug_str' invalid
without /LARGEADDRESSAWARE:NO
hello-669244.o : error LNK2017: 'ADDR32' relocation to '.debug_str' invalid
without /LARGEADDRESSAWARE:NO
hello-669244.o : error LNK2017: 'ADDR32' relocation to '.debug_str' invalid
without /LARGEADDRESSAWARE:NO
hello-669244.o : error LNK2017: 'ADDR32' relocation to '.debug_str' invalid
without /LARGEADDRESSAWARE:NO
hello-669244.o : error LNK2017: 'ADDR32' relocation to '.debug_str' invalid
without /LARGEADDRESSAWARE:NO
hello-669244.o : error LNK2017: 'ADDR32' relocation to '.debug_str' invalid
without /LARGEADDRESSAWARE:NO
hello-669244.o : error LNK2017: 'ADDR32' relocation to '.text' invalid without
/LARGEADDRESSAWARE:NO
LINK : fatal error LNK1165: link failed because of fixup errors
clang: error: linker command failed with exit code 1165 (use -v to see
invocation)
This is working:
<span class="quote">> clang -c hello.c -o hello.obj -g -target "x86_64-pc-win32" -fno-exceptions -fno-cxx-exceptions -fno-use-cxa-atexit -v</span >
[...]
<span class="quote">> "C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/BIN/amd64/link.exe" -out:hello.exe -defaultlib:libcmt -nologo hello.obj /LARGEADDRESSAWARE:NO /MACHINE:X64</span >
[...]
<span class="quote">> hello.exe</span >
Hello World!
However, restricting the address space to 31 bits doesn't seem to be the point
of compiling to a 64 bit target. Although, this applies only to the debug
version.
Using
clang/llvm r175980
Windows 7
Visual Studio 2012 SP1</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>