mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
compiler: emit non-PIE executables
This fixes a problem on baremetal targets, where PIE doesn't make any sense. Specifically, on ARM, the compiler sometimes inserted GOT pointers for linker-defined globals.
This commit is contained in:
+1
-1
@@ -93,7 +93,7 @@ func NewCompiler(pkgName, triple string, dumpSSA bool) (*Compiler, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.machine = target.CreateTargetMachine(triple, "", "", llvm.CodeGenLevelDefault, llvm.RelocPIC, llvm.CodeModelDefault)
|
||||
c.machine = target.CreateTargetMachine(triple, "", "", llvm.CodeGenLevelDefault, llvm.RelocStatic, llvm.CodeModelDefault)
|
||||
c.targetData = c.machine.CreateTargetData()
|
||||
|
||||
c.mod = llvm.NewModule(pkgName)
|
||||
|
||||
Reference in New Issue
Block a user