Skip to content
Commit e8a6430f authored by Shang XiaoJing's avatar Shang XiaoJing Committed by Arnaldo Carvalho de Melo
Browse files

perf genelf: Fix error code in jit_write_elf()



The error code is set to -1 at the beginning of jit_write_elf(), but it is
assigned by jit_add_eh_frame_info() in the middle, hence the following
error can only return the error code of jit_add_eh_frame_info(). Reset
the error code to the default value after being assigned by
jit_add_eh_frame_info().

Fixes: 086f9f3d ("perf jit: Generate .eh_frame/.eh_frame_hdr in DSO")
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stefano Sanfilippo <ssanfilippo@chromium.org>
Link: https://lore.kernel.org/r/20220922141438.22487-2-shangxiaojing@huawei.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c1da8dd5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment