mirror of https://gitlab.com/ita1024/waf.git
Fix crash in demos/asm
Crash is likely because gcc has become more strict in recent version. To fix it I had to add the -no-pie flag and move mult10 to the text section.
This commit is contained in:
parent
dc5602608e
commit
f0b2fb9816
|
@ -1,16 +1,16 @@
|
||||||
#include "header.h"
|
#include "header.h"
|
||||||
|
|
||||||
.text
|
.data
|
||||||
.align 2
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
val:
|
val:
|
||||||
.long SOME_VALUE
|
.long SOME_VALUE
|
||||||
|
|
||||||
|
.text
|
||||||
|
.align 2
|
||||||
|
|
||||||
// Multiply input value by 421...
|
// Multiply input value by 421...
|
||||||
.global mult10
|
.global mult10
|
||||||
.type mult10, function
|
.type mult10, @function
|
||||||
mult10:
|
mult10:
|
||||||
pushq %rbp
|
pushq %rbp
|
||||||
movq %rsp,%rbp
|
movq %rsp,%rbp
|
||||||
|
@ -20,4 +20,3 @@ mult10:
|
||||||
|
|
||||||
popq %rbp
|
popq %rbp
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,10 @@ def build(bld):
|
||||||
target = 'asmtest',
|
target = 'asmtest',
|
||||||
defines = 'foo=12',
|
defines = 'foo=12',
|
||||||
asflags = '-Os',
|
asflags = '-Os',
|
||||||
includes = '.')
|
includes = '.',
|
||||||
|
linkflags = '-no-pie')
|
||||||
|
|
||||||
def disp(ctx):
|
def disp(ctx):
|
||||||
node = ctx.bldnode.ant_glob('asmtest*', remove=False)[0]
|
node = ctx.bldnode.ant_glob('asmtest*', remove=False)[0]
|
||||||
ctx.exec_command('%s' % node.abspath(), shell=False)
|
ctx.exec_command('%s' % node.abspath(), shell=False)
|
||||||
bld.add_post_fun(disp)
|
bld.add_post_fun(disp)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue