linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: LLVMLinux: Provide __aeabi_* symbols which are needed for clang
@ 2014-09-05 23:23 behanw at converseincode.com
  2014-09-06 14:16 ` Arnd Bergmann
  0 siblings, 1 reply; 7+ messages in thread
From: behanw at converseincode.com @ 2014-09-05 23:23 UTC (permalink / raw)
  To: linux-arm-kernel

From: Behan Webster <behanw@converseincode.com>

These symbols are required when compiling the Linux kernel for arch ARM64 with
clang.

Author: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
---
 arch/arm64/lib/Makefile |  4 ++++
 arch/arm64/lib/eabi.c   | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 arch/arm64/lib/eabi.c

diff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile
index d98d3e3..0d3407c 100644
--- a/arch/arm64/lib/Makefile
+++ b/arch/arm64/lib/Makefile
@@ -3,3 +3,7 @@ lib-y		:= bitops.o clear_user.o delay.o copy_from_user.o	\
 		   clear_page.o memchr.o memcpy.o memmove.o memset.o	\
 		   memcmp.o strcmp.o strncmp.o strlen.o strnlen.o	\
 		   strchr.o strrchr.o
+
+ifeq ($(COMPILER),clang)
+lib-y += eabi.o
+endif
diff --git a/arch/arm64/lib/eabi.c b/arch/arm64/lib/eabi.c
new file mode 100644
index 0000000..41b27b2
--- /dev/null
+++ b/arch/arm64/lib/eabi.c
@@ -0,0 +1,32 @@
+/*
+ *  linux/lib/eabi.c
+ *
+ *  Copyright (C) 2012  Mark Charlebois
+ */
+
+/*
+ * EABI routines
+ */
+
+#include <linux/types.h>
+#include <linux/string.h>
+#include <linux/ctype.h>
+#include <linux/export.h>
+
+void __aeabi_memcpy(void *dest, const void *src, size_t n)
+{
+	(void)memcpy(dest, src, n);
+}
+EXPORT_SYMBOL(__aeabi_memcpy);
+
+void __aeabi_memmove(void *dest, const void *src, size_t n)
+{
+	(void)memmove(dest, src, n);
+}
+EXPORT_SYMBOL(__aeabi_memmove);
+
+void __aeabi_memset(void *s, size_t n, int c)
+{
+	(void)memset(s, c, n);
+}
+EXPORT_SYMBOL(__aeabi_memset);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] arm64: LLVMLinux: Provide __aeabi_* symbols which are needed for clang
  2014-09-05 23:23 [PATCH] arm64: LLVMLinux: Provide __aeabi_* symbols which are needed for clang behanw at converseincode.com
@ 2014-09-06 14:16 ` Arnd Bergmann
  2014-09-07  2:28   ` Behan Webster
  2014-09-07  2:30   ` Mark Charlebois
  0 siblings, 2 replies; 7+ messages in thread
From: Arnd Bergmann @ 2014-09-06 14:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 05 September 2014 16:23:14 behanw at converseincode.com wrote:
> --- /dev/null
> +++ b/arch/arm64/lib/eabi.c
> @@ -0,0 +1,32 @@
> +/*
> + *  linux/lib/eabi.c

Please don't put the file names in the files themselves, it's redundant
and in this case actually wrong.

> + *  Copyright (C) 2012  Mark Charlebois
> + */
> +
> +/*
> + * EABI routines

Does EABI specify these function names? I would think that they are
just random libgcc (whatever that is called in clang) functions.

	Arnd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] arm64: LLVMLinux: Provide __aeabi_* symbols which are needed for clang
  2014-09-06 14:16 ` Arnd Bergmann
@ 2014-09-07  2:28   ` Behan Webster
  2014-09-07  2:30   ` Mark Charlebois
  1 sibling, 0 replies; 7+ messages in thread
From: Behan Webster @ 2014-09-07  2:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/06/14 07:16, Arnd Bergmann wrote:
> On Friday 05 September 2014 16:23:14 behanw at converseincode.com wrote:
>> --- /dev/null
>> +++ b/arch/arm64/lib/eabi.c
>> @@ -0,0 +1,32 @@
>> +/*
>> + *  linux/lib/eabi.c
> Please don't put the file names in the files themselves, it's redundant
> and in this case actually wrong.
Will fix.

>> + *  Copyright (C) 2012  Mark Charlebois
>> + */
>> +
>> +/*
>> + * EABI routines
> Does EABI specify these function names? I would think that they are
> just random libgcc (whatever that is called in clang) functions.
These specialized functions are part of the ABI for the ARM architecture 
(AEABI). They aren't random.

Memcpy and memmove *could* might be satisfied with linker magic instead. 
But memset uses the reverse parameter list.

Behan

-- 
Behan Webster
behanw at converseincode.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] arm64: LLVMLinux: Provide __aeabi_* symbols which are needed for clang
  2014-09-06 14:16 ` Arnd Bergmann
  2014-09-07  2:28   ` Behan Webster
@ 2014-09-07  2:30   ` Mark Charlebois
  2014-09-07  7:30     ` Catalin Marinas
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Charlebois @ 2014-09-07  2:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 6, 2014 at 7:16 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Friday 05 September 2014 16:23:14 behanw at converseincode.com wrote:
> > --- /dev/null
> > +++ b/arch/arm64/lib/eabi.c
> > @@ -0,0 +1,32 @@
> > +/*
> > + *  linux/lib/eabi.c
>
> Please don't put the file names in the files themselves, it's redundant
> and in this case actually wrong.

Sorry, will fix.

>
> > + *  Copyright (C) 2012  Mark Charlebois
> > + */
> > +
> > +/*
> > + * EABI routines
>
> Does EABI specify these function names? I would think that they are
> just random libgcc (whatever that is called in clang) functions.

http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043d/IHI0043D_rtabi.pdf

See section 4.3.4 Memory copying, clearing, and setting

>
>         Arnd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] arm64: LLVMLinux: Provide __aeabi_* symbols which are needed for clang
  2014-09-07  2:30   ` Mark Charlebois
@ 2014-09-07  7:30     ` Catalin Marinas
  2014-09-08 21:01       ` Mark Charlebois
  0 siblings, 1 reply; 7+ messages in thread
From: Catalin Marinas @ 2014-09-07  7:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 7 Sep 2014, at 03:30, Mark Charlebois <charlebm@gmail.com> wrote:
> On Sat, Sep 6, 2014 at 7:16 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> 
>> On Friday 05 September 2014 16:23:14 behanw at converseincode.com wrote:
>>> + *  Copyright (C) 2012  Mark Charlebois
>>> + */
>>> +
>>> +/*
>>> + * EABI routines
>> 
>> Does EABI specify these function names? I would think that they are
>> just random libgcc (whatever that is called in clang) functions.
> 
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043d/IHI0043D_rtabi.pdf
> 
> See section 4.3.4 Memory copying, clearing, and setting

What does this document have to do with arm64 (AArch64, A64)? We don?t
need such symbols on arm64. Also, the arm64 kernel links with libgcc (no
immediate need AFAICT but the compiler does not guarantee the intrinsics
would always be generated inline).

Catalin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] arm64: LLVMLinux: Provide __aeabi_* symbols which are needed for clang
  2014-09-07  7:30     ` Catalin Marinas
@ 2014-09-08 21:01       ` Mark Charlebois
  2014-09-08 21:53         ` Behan Webster
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Charlebois @ 2014-09-08 21:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Sep 7, 2014 at 12:30 AM, Catalin Marinas
<catalin.marinas@arm.com> wrote:
> On 7 Sep 2014, at 03:30, Mark Charlebois <charlebm@gmail.com> wrote:
>> On Sat, Sep 6, 2014 at 7:16 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>>>
>>> On Friday 05 September 2014 16:23:14 behanw at converseincode.com wrote:
>>>> + *  Copyright (C) 2012  Mark Charlebois
>>>> + */
>>>> +
>>>> +/*
>>>> + * EABI routines
>>>
>>> Does EABI specify these function names? I would think that they are
>>> just random libgcc (whatever that is called in clang) functions.
>>
>> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043d/IHI0043D_rtabi.pdf
>>
>> See section 4.3.4 Memory copying, clearing, and setting
>
> What does this document have to do with arm64 (AArch64, A64)? We don?t
> need such symbols on arm64. Also, the arm64 kernel links with libgcc (no
> immediate need AFAICT but the compiler does not guarantee the intrinsics
> would always be generated inline).

[reposting in plain text]

This patch was made early in the arm64 kernel support. I just retested
and you are correct, it is no longer needed.  My apologies to all.

-Mark

>
> Catalin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] arm64: LLVMLinux: Provide __aeabi_* symbols which are needed for clang
  2014-09-08 21:01       ` Mark Charlebois
@ 2014-09-08 21:53         ` Behan Webster
  0 siblings, 0 replies; 7+ messages in thread
From: Behan Webster @ 2014-09-08 21:53 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/08/14 16:01, Mark Charlebois wrote:
> On Sun, Sep 7, 2014 at 12:30 AM, Catalin Marinas
> <catalin.marinas@arm.com> wrote:
>> On 7 Sep 2014, at 03:30, Mark Charlebois <charlebm@gmail.com> wrote:
>>> On Sat, Sep 6, 2014 at 7:16 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>>>> On Friday 05 September 2014 16:23:14 behanw at converseincode.com wrote:
>>>>> + *  Copyright (C) 2012  Mark Charlebois
>>>>> + */
>>>>> +
>>>>> +/*
>>>>> + * EABI routines
>>>> Does EABI specify these function names? I would think that they are
>>>> just random libgcc (whatever that is called in clang) functions.
>>> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043d/IHI0043D_rtabi.pdf
>>>
>>> See section 4.3.4 Memory copying, clearing, and setting
>> What does this document have to do with arm64 (AArch64, A64)? We don?t
>> need such symbols on arm64. Also, the arm64 kernel links with libgcc (no
>> immediate need AFAICT but the compiler does not guarantee the intrinsics
>> would always be generated inline).
> [reposting in plain text]
>
> This patch was made early in the arm64 kernel support. I just retested
> and you are correct, it is no longer needed.  My apologies to all.

Whoops. I normally check whether a patch is still needed before posting 
them. I seem to have missed that step this time. My apologies as well.

That all being said, I prefer to see patches no longer required, than 
needing them to be upstreamed, so in that this is a win.

Behan

-- 
Behan Webster
behanw at converseincode.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-08 21:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05 23:23 [PATCH] arm64: LLVMLinux: Provide __aeabi_* symbols which are needed for clang behanw at converseincode.com
2014-09-06 14:16 ` Arnd Bergmann
2014-09-07  2:28   ` Behan Webster
2014-09-07  2:30   ` Mark Charlebois
2014-09-07  7:30     ` Catalin Marinas
2014-09-08 21:01       ` Mark Charlebois
2014-09-08 21:53         ` Behan Webster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).