Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Fix build errors due to low kernel version #1838

Merged
merged 1 commit into from Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions arch/aarch64/mcount-dynamic.c
Expand Up @@ -14,6 +14,10 @@
#include "utils/symbol.h"
#include "utils/utils.h"

#ifndef MAP_FIXED_NOREPLACE
#define MAP_FIXED_NOREPLACE MAP_FIXED
#endif

#define CODE_SIZE 8

static const unsigned int patchable_nop_patt[] = { 0xd503201f, 0xd503201f };
Expand Down
4 changes: 4 additions & 0 deletions arch/i386/mcount-dynamic.c
Expand Up @@ -11,6 +11,10 @@
#include "utils/symbol.h"
#include "utils/utils.h"

#ifndef MAP_FIXED_NOREPLACE
#define MAP_FIXED_NOREPLACE MAP_FIXED
#endif

static const unsigned char fentry_nop_patt[] = { 0x0f, 0x1f, 0x44, 0x00, 0x00 };

int mcount_setup_trampoline(struct mcount_dynamic_info *mdi)
Expand Down
4 changes: 4 additions & 0 deletions arch/x86_64/mcount-dynamic.c
Expand Up @@ -12,6 +12,10 @@
#include "utils/symbol.h"
#include "utils/utils.h"

#ifndef MAP_FIXED_NOREPLACE
#define MAP_FIXED_NOREPLACE MAP_FIXED
#endif

static const unsigned char fentry_nop_patt1[] = { 0x67, 0x0f, 0x1f, 0x04, 0x00 };
static const unsigned char fentry_nop_patt2[] = { 0x0f, 0x1f, 0x44, 0x00, 0x00 };
static const unsigned char patchable_gcc_nop[] = { 0x90, 0x90, 0x90, 0x90, 0x90 };
Expand Down
4 changes: 4 additions & 0 deletions cmds/record.c
Expand Up @@ -29,6 +29,10 @@
#include "utils/symbol.h"
#include "utils/utils.h"

#ifndef EM_RISCV
#define EM_RISCV 243
#endif

#ifndef EFD_SEMAPHORE
#define EFD_SEMAPHORE (1 << 0)
#endif
Expand Down
4 changes: 4 additions & 0 deletions utils/tracefs.c
Expand Up @@ -8,6 +8,10 @@
#include "utils/tracefs.h"
#include "utils/utils.h"

#ifndef TRACEFS_MAGIC
#define TRACEFS_MAGIC 0x74726163
#endif

#define PROC_MOUNTS_DIR_PATH "/proc/mounts"
#define TRACEFS_DIR_PATH "/sys/kernel/tracing"
#define OLD_TRACEFS_DIR_PATH "/sys/kernel/debug/tracing"
Expand Down