https://bugs.llvm.org/show_bug.cgi?id=51535

Fangrui Song <i...@maskray.me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |i...@maskray.me
         Resolution|---                         |INVALID

--- Comment #3 from Fangrui Song <i...@maskray.me> ---
In principle the compiler can use GOT in -fno-pic mode. It is even desired to
do so for undefined symbols. For defined symbols, omitting GOT whenever
possible is fine.


@arr = common dso_local global [8 x i8] zeroinitializer
=>
  movabsq $arr, %rdi

@arr = common dso_preemptable global [8 x i8] zeroinitializer
=>
  movq    arr@GOTPCREL(%rip), %rdi


Clang correctly sets dso_local/dso_preemptable. If your frontend wants to use
absolute relocations, please set dso_local explicitly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to