From: guenther Date: Wed, 7 Dec 2022 19:21:54 +0000 (+0000) Subject: Prefer STRONG_ALIAS() over multiple overlapping _ENTRY/_NENTRY X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c05aff73922a79a26e8bbf5327c574754102e6b8;p=openbsd Prefer STRONG_ALIAS() over multiple overlapping _ENTRY/_NENTRY uses, as the latter requires manual handling of _PROF_PROLOGUE. Add END()s to match ENTRY()s. ok deraadt@ --- diff --git a/sys/lib/libkern/arch/amd64/htonl.S b/sys/lib/libkern/arch/amd64/htonl.S index dbe6647e7f3..cce7babf4be 100644 --- a/sys/lib/libkern/arch/amd64/htonl.S +++ b/sys/lib/libkern/arch/amd64/htonl.S @@ -40,13 +40,14 @@ #include -_ENTRY(htonl) -_NENTRY(ntohl) -_NENTRY(bswap32) -_PROF_PROLOGUE +STRONG_ALIAS(ntohl, htonl) +STRONG_ALIAS(bswap32, htonl) + +ENTRY(htonl) RETGUARD_SETUP(htonl, r11) movl %edi,%eax bswap %eax RETGUARD_CHECK(htonl, r11) ret lfence +END(htonl) diff --git a/sys/lib/libkern/arch/amd64/htons.S b/sys/lib/libkern/arch/amd64/htons.S index c7943cf7140..9cc236e9a98 100644 --- a/sys/lib/libkern/arch/amd64/htons.S +++ b/sys/lib/libkern/arch/amd64/htons.S @@ -40,13 +40,14 @@ #include -_ENTRY(htons) -_NENTRY(ntohs) -_NENTRY(bswap16) -_PROF_PROLOGUE +STRONG_ALIAS(ntohs, htons) +STRONG_ALIAS(bswap16, htons) + +ENTRY(htons) RETGUARD_SETUP(htons, r11) movl %edi,%eax xchgb %ah,%al RETGUARD_CHECK(htons, r11) ret lfence +END(htons)