https://llvm.org/bugs/show_bug.cgi?id=26030
Bug ID: 26030 Summary: On arm64 with mcmodel=large and fPIC clang produces code with absolute relocations Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: phco...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Happens when dereferencing a string. Sample code: phcoder@sid:16:25:30:~/grub2$ cat clang-arm64.c const char *tst(void) { return "x"; } Compilation: phcoder@sid:16:23:46:~/grub2$ clang-3.8 -target aarch64-linux-gnu -fPIC -o 1.o clang-arm64.c -c -mcmodel=large clang version: phcoder@sid:16:25:29:~/grub2$ clang-3.8 -v Debian clang version 3.8.0-svn254193-1 (trunk) (based on LLVM 3.8.0) Resultion object file: 1.o: file format elf64-littleaarch64 Disassembly of section .text: 0000000000000000 <tst>: tst(): 0: d2e00008 movz x8, #0x0, lsl #48 0: R_AARCH64_MOVW_UABS_G3 .rodata.str1.1 4: f2c00008 movk x8, #0x0, lsl #32 4: R_AARCH64_MOVW_UABS_G2_NC .rodata.str1.1 8: f2a00008 movk x8, #0x0, lsl #16 8: R_AARCH64_MOVW_UABS_G1_NC .rodata.str1.1 c: f2800008 movk x8, #0x0 c: R_AARCH64_MOVW_UABS_G0_NC .rodata.str1.1 10: aa0803e0 mov x0, x8 14: d65f03c0 ret Expected results: No absolute relocations Actual results: absolute relocations R_AARCH64_MOVW_UABS_G* -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs