Merge branch 'fix-asm-example' into 'master'

Fix crash in demos/asm

See merge request ita1024/waf!2358
This commit is contained in:
ita1024 2023-09-26 20:39:10 +00:00
commit 5a4bc9039f
2 changed files with 7 additions and 8 deletions

View File

@ -1,16 +1,16 @@
#include "header.h"
.text
.align 2
.section .data
.data
val:
.long SOME_VALUE
.text
.align 2
// Multiply input value by 421...
.global mult10
.type mult10, function
.type mult10, @function
mult10:
pushq %rbp
movq %rsp,%rbp
@ -20,4 +20,3 @@ mult10:
popq %rbp
ret

View File

@ -19,10 +19,10 @@ def build(bld):
target = 'asmtest',
defines = 'foo=12',
asflags = '-Os',
includes = '.')
includes = '.',
linkflags = '-no-pie')
def disp(ctx):
node = ctx.bldnode.ant_glob('asmtest*', remove=False)[0]
ctx.exec_command('%s' % node.abspath(), shell=False)
bld.add_post_fun(disp)