Skip to content

Commit

Permalink
LibELF+Kernel: Don't define SERENITY_PAGE_SIZE in ELFABI.h
Browse files Browse the repository at this point in the history
ELFABI.h gets included during the toolchain build, so we shouldn't
include AK headers from that file.
SERENITY_PAGE_SIZE also isn't really related to ELF ABI, so move it to
the serenity_limits.h header.
  • Loading branch information
spholz committed Dec 3, 2024
1 parent 5974f08 commit b499279
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 6 additions & 0 deletions Kernel/API/serenity_limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
#pragma once

#define PTHREAD_STACK_MAX (32 * 1024 * 1024) // 32MiB

#ifdef __serenity__
# define SERENITY_PAGE_SIZE PAGE_SIZE
#else
# define SERENITY_PAGE_SIZE 4096
#endif
8 changes: 0 additions & 8 deletions Userland/Libraries/LibELF/ELFABI.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,10 @@
# include <AK/Types.h>
#endif

#include <AK/Platform.h>

#define ElfW(type) Elf64_##type

#define ELFSIZE 64

#if defined(AK_OS_SERENITY)
# define SERENITY_PAGE_SIZE PAGE_SIZE
#else
# define SERENITY_PAGE_SIZE 4096
#endif

typedef uint8_t Elf_Byte;

typedef uint32_t Elf32_Addr; /* Unsigned program address */
Expand Down

0 comments on commit b499279

Please sign in to comment.