Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac0e8c72 authored by Mark Rutland's avatar Mark Rutland Committed by Will Deacon
Browse files

arm64: string: use asm EXPORT_SYMBOL()



For a while now it's been possible to use EXPORT_SYMBOL() in assembly
files, which allows us to place exports immediately after assembly
functions, as we do for C functions.

As a step towards removing arm64ksyms.c, let's move the string routine
exports to the assembly files the functions are defined in. Routines
which should only be exported for !KASAN builds are exported using the
EXPORT_SYMBOL_NOKASAN() helper.

There should be no functional change as a result of this patch.

Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 56c08ec5
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@

#include <linux/export.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/cryptohash.h>
#include <linux/delay.h>
#include <linux/in6.h>
@@ -29,25 +28,6 @@

#include <asm/checksum.h>

	/* string / mem functions */
#ifndef CONFIG_KASAN
EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(memcmp);
EXPORT_SYMBOL(memchr);
#endif

EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(__memset);
EXPORT_SYMBOL(__memcpy);
EXPORT_SYMBOL(__memmove);

#ifdef CONFIG_FUNCTION_TRACER
EXPORT_SYMBOL(_mcount);
NOKPROBE_SYMBOL(_mcount);
+1 −0
Original line number Diff line number Diff line
@@ -42,3 +42,4 @@ WEAK(memchr)
2:	mov	x0, #0
	ret
ENDPIPROC(memchr)
EXPORT_SYMBOL_NOKASAN(memchr)
+1 −0
Original line number Diff line number Diff line
@@ -256,3 +256,4 @@ CPU_LE( rev data2, data2 )
	mov	result, #0
	ret
ENDPIPROC(memcmp)
EXPORT_SYMBOL_NOKASAN(memcmp)
+2 −0
Original line number Diff line number Diff line
@@ -74,4 +74,6 @@ ENTRY(memcpy)
#include "copy_template.S"
	ret
ENDPIPROC(memcpy)
EXPORT_SYMBOL(memcpy)
ENDPROC(__memcpy)
EXPORT_SYMBOL(__memcpy)
+2 −0
Original line number Diff line number Diff line
@@ -197,4 +197,6 @@ ENTRY(memmove)
	b.ne	.Ltail63
	ret
ENDPIPROC(memmove)
EXPORT_SYMBOL(memmove)
ENDPROC(__memmove)
EXPORT_SYMBOL(__memmove)
Loading