Skip to content

Compile error after changing examples/uretprobe 's target from amd64 to arm64. #1122

Closed Answered by xiaoziv
xiaoziv asked this question in Q&A
Discussion options

You must be logged in to vote

I have solved this problem by appending the following snippet to headers/common.h.
@florianl thanks.

#if defined(__TARGET_ARCH_arm64)
struct user_pt_regs {
	__u64		regs[31];
	__u64		sp;
	__u64		pc;
	__u64		pstate;
};
struct pt_regs {
	union {
		struct user_pt_regs user_regs;
		struct {
			u64 regs[31];
			u64 sp;
			u64 pc;
			u64 pstate;
		};
	};
	u64 orig_x0;
#ifdef __AARCH64EB__
	u32 unused2;
	s32 syscallno;
#else
	s32 syscallno;
	u32 unused2;
#endif
	u64 sdei_ttbr1;
	/* Only valid when ARM64_HAS_GIC_PRIO_MASKING is enabled. */
	u64 pmr_save;
	u64 stackframe[2];

	/* Only valid for some EL1 exceptions. */
	u64 lockdep_hardirqs;
	u64 exit_rcu;
};
#endif

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@xiaoziv
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ti-mo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants