Skip to content

Commit

Permalink
x86/copy: Add memset symbol size
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
  • Loading branch information
heatd committed Apr 9, 2023
1 parent 98f58a4 commit 58ff98a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kernel/arch/arm64/make.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ KERNEL_ARCH_LDFLAGS:=-z max-page-size=0x1000
# ARM64 has no crti.o nor crtn.o
ARCH_NO_CRTI_N:=1

LIBK_ARCH_OBJS:= string/memcpy.o
LIBK_ARCH_OBJS:= string/memcpy.o string/memset.o
2 changes: 1 addition & 1 deletion kernel/arch/riscv64/make.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ KERNEL_ARCH_LDFLAGS:=-z max-page-size=0x1000
# RISCV has no crti.o nor crtn.o
ARCH_NO_CRTI_N:=1

LIBK_ARCH_OBJS:= string/memcpy.o
LIBK_ARCH_OBJS:= string/memcpy.o string/memset.o
11 changes: 8 additions & 3 deletions kernel/arch/x86_64/copy.S
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ __set_non_temporal:

RET

.global memset
.type memset, @function
memset:
.global __memset
.type __memset, @function
__memset:
push %rbp
mov %rsp, %rbp

Expand All @@ -104,3 +104,8 @@ memset:

pop %rbp
RET

.size __memset, . - __memset

.weak memset
.set memset, __memset
1 change: 0 additions & 1 deletion kernel/lib/libk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ LIBK_OBJS:=\
stdio/printf.o \
stdio/puts.o \
string/memcmp.o \
string/memset.o \
string/strlen.o \
string/strcpy.o \
string/strcmp.o \
Expand Down

0 comments on commit 58ff98a

Please sign in to comment.