diff options
Diffstat (limited to 'tools/perf/arch/x86/tests')
-rw-r--r-- | tools/perf/arch/x86/tests/dwarf-unwind.c | 3 | ||||
-rw-r--r-- | tools/perf/arch/x86/tests/regs_load.S | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/tools/perf/arch/x86/tests/dwarf-unwind.c b/tools/perf/arch/x86/tests/dwarf-unwind.c index b602ad93ce63..83bc2385e6d3 100644 --- a/tools/perf/arch/x86/tests/dwarf-unwind.c +++ b/tools/perf/arch/x86/tests/dwarf-unwind.c | |||
@@ -23,9 +23,10 @@ static int sample_ustack(struct perf_sample *sample, | |||
23 | 23 | ||
24 | sp = (unsigned long) regs[PERF_REG_X86_SP]; | 24 | sp = (unsigned long) regs[PERF_REG_X86_SP]; |
25 | 25 | ||
26 | map = map_groups__find(&thread->mg, MAP__FUNCTION, (u64) sp); | 26 | map = map_groups__find(&thread->mg, MAP__VARIABLE, (u64) sp); |
27 | if (!map) { | 27 | if (!map) { |
28 | pr_debug("failed to get stack map\n"); | 28 | pr_debug("failed to get stack map\n"); |
29 | free(buf); | ||
29 | return -1; | 30 | return -1; |
30 | } | 31 | } |
31 | 32 | ||
diff --git a/tools/perf/arch/x86/tests/regs_load.S b/tools/perf/arch/x86/tests/regs_load.S index 99167bf644ea..60875d5c556c 100644 --- a/tools/perf/arch/x86/tests/regs_load.S +++ b/tools/perf/arch/x86/tests/regs_load.S | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | #include <linux/linkage.h> | 1 | #include <linux/linkage.h> |
3 | 2 | ||
4 | #define AX 0 | 3 | #define AX 0 |
@@ -90,3 +89,10 @@ ENTRY(perf_regs_load) | |||
90 | ret | 89 | ret |
91 | ENDPROC(perf_regs_load) | 90 | ENDPROC(perf_regs_load) |
92 | #endif | 91 | #endif |
92 | |||
93 | /* | ||
94 | * We need to provide note.GNU-stack section, saying that we want | ||
95 | * NOT executable stack. Otherwise the final linking will assume that | ||
96 | * the ELF stack should not be restricted at all and set it RWX. | ||
97 | */ | ||
98 | .section .note.GNU-stack,"",@progbits | ||