From b4bb74214ef2d9c0116e715091d9e296c0fede23 Mon Sep 17 00:00:00 2001 From: justin Date: Sun, 17 May 2015 20:57:11 +0000 Subject: [PATCH] Do not build arm toolchain symbols in the rump kernel These symbols will be provided at link time and will be duplicate symbols in rump kernel and libc if defined. Many have been fixed previously, but these were missed as did not have a test. --- common/lib/libc/arch/arm/atomic/atomic_op_asm.h | 5 +---- common/lib/libc/arch/arm/atomic/atomic_swap.S | 6 +++--- common/lib/libc/arch/arm/atomic/atomic_swap_16.S | 4 ++-- common/lib/libc/arch/arm/atomic/atomic_swap_64.S | 4 ++-- .../lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_1.S | 4 ++-- .../lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_2.S | 4 ++-- .../lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_4.S | 4 ++-- .../lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_8.S | 4 ++-- common/lib/libc/arch/arm/atomic/sync_fetch_and_add_8.S | 4 ++-- common/lib/libc/arch/arm/atomic/sync_fetch_and_and_8.S | 4 ++-- common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S | 4 ++-- common/lib/libc/arch/arm/atomic/sync_fetch_and_or_8.S | 4 ++-- common/lib/libc/arch/arm/atomic/sync_fetch_and_sub_8.S | 4 ++-- common/lib/libc/arch/arm/atomic/sync_fetch_and_xor_8.S | 4 ++-- common/lib/libc/arch/arm/string/ffs.S | 6 ++++-- 15 files changed, 32 insertions(+), 33 deletions(-) diff --git a/common/lib/libc/arch/arm/atomic/atomic_op_asm.h b/common/lib/libc/arch/arm/atomic/atomic_op_asm.h index 6f921e7819c1..3a38273aed68 100644 --- a/common/lib/libc/arch/arm/atomic/atomic_op_asm.h +++ b/common/lib/libc/arch/arm/atomic/atomic_op_asm.h @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_op_asm.h,v 1.6 2014/03/04 16:15:28 matt Exp $ */ +/* $NetBSD: atomic_op_asm.h,v 1.7 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -44,9 +44,6 @@ #if defined(_KERNEL) || defined(_STANDALONE) #define ATOMIC_OP_ALIAS(a,s) STRONG_ALIAS(a,s) -#ifdef _RUMPKERNEL -#define CRT_ALIAS(a,s) STRONG_ALIAS(a,s) -#endif #else /* _KERNEL */ diff --git a/common/lib/libc/arch/arm/atomic/atomic_swap.S b/common/lib/libc/arch/arm/atomic/atomic_swap.S index 525de810cb0c..1157c6564c4f 100644 --- a/common/lib/libc/arch/arm/atomic/atomic_swap.S +++ b/common/lib/libc/arch/arm/atomic/atomic_swap.S @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_swap.S,v 1.13 2015/04/17 07:15:02 skrll Exp $ */ +/* $NetBSD: atomic_swap.S,v 1.14 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2007,2012 The NetBSD Foundation, Inc. @@ -84,7 +84,7 @@ STRONG_ALIAS(_atomic_swap_uint,_atomic_swap_32) STRONG_ALIAS(_atomic_swap_ulong,_atomic_swap_32) STRONG_ALIAS(_atomic_swap_ptr,_atomic_swap_32) -#if (!defined(_KERNEL) || defined(_RUMPKERNEL)) && !defined(_STANDALONE) +#if (!defined(_KERNEL) || !defined(_RUMPKERNEL)) && !defined(_STANDALONE) ENTRY_NP(__sync_lock_release_4) mov r1, #0 #ifdef _ARM_ARCH_7 @@ -125,7 +125,7 @@ CRT_ALIAS(__atomic_exchange_1,_atomic_swap_8) STRONG_ALIAS(_atomic_swap_char,_atomic_swap_8) STRONG_ALIAS(_atomic_swap_uchar,_atomic_swap_8) -#if (!defined(_KERNEL) || defined(_RUMPKERNEL)) && !defined(_STANDALONE) +#if (!defined(_KERNEL) || !defined(_RUMPKERNEL)) && !defined(_STANDALONE) ENTRY_NP(__sync_lock_release_1) mov r1, #0 #ifdef _ARM_ARCH_7 diff --git a/common/lib/libc/arch/arm/atomic/atomic_swap_16.S b/common/lib/libc/arch/arm/atomic/atomic_swap_16.S index ffe0706c7dff..83bb0f97b0e9 100644 --- a/common/lib/libc/arch/arm/atomic/atomic_swap_16.S +++ b/common/lib/libc/arch/arm/atomic/atomic_swap_16.S @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_swap_16.S,v 1.3 2014/06/28 20:18:55 joerg Exp $ */ +/* $NetBSD: atomic_swap_16.S,v 1.4 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ CRT_ALIAS(__atomic_exchange_2,_atomic_swap_16) STRONG_ALIAS(_atomic_swap_short,_atomic_swap_16) STRONG_ALIAS(_atomic_swap_ushort,_atomic_swap_16) -#if (!defined(_KERNEL) || defined(_RUMPKERNEL)) && !defined(_STANDALONE) +#if (!defined(_KERNEL) || !defined(_RUMPKERNEL)) && !defined(_STANDALONE) ENTRY_NP(__sync_lock_release_2) mov r1, #0 strh r1, [r0] diff --git a/common/lib/libc/arch/arm/atomic/atomic_swap_64.S b/common/lib/libc/arch/arm/atomic/atomic_swap_64.S index 9e15305854ef..a4b6e7cfd604 100644 --- a/common/lib/libc/arch/arm/atomic/atomic_swap_64.S +++ b/common/lib/libc/arch/arm/atomic/atomic_swap_64.S @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_swap_64.S,v 1.9 2014/06/28 20:18:55 joerg Exp $ */ +/* $NetBSD: atomic_swap_64.S,v 1.10 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -53,7 +53,7 @@ ATOMIC_OP_ALIAS(atomic_swap_64,_atomic_swap_64) CRT_ALIAS(__sync_lock_test_and_set_8,_atomic_swap_64) CRT_ALIAS(__atomic_exchange_8,_atomic_swap_64) -#if (!defined(_KERNEL) || defined(_RUMPKERNEL)) && !defined(_STANDALONE) +#if (!defined(_KERNEL) || !defined(_RUMPKERNEL)) && !defined(_STANDALONE) ENTRY_NP(__sync_lock_release_8) mov r2, #0 mov r3, #0 diff --git a/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_1.S b/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_1.S index 8640bab86bfc..b14d0f6cdbe8 100644 --- a/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_1.S +++ b/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_1.S @@ -1,4 +1,4 @@ -/* $NetBSD: sync_bool_compare_and_swap_1.S,v 1.1 2013/11/08 22:42:52 matt Exp $ */ +/* $NetBSD: sync_bool_compare_and_swap_1.S,v 1.2 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "atomic_op_asm.h" -#if defined(_ARM_ARCH_6) +#if defined(_ARM_ARCH_6) && !defined(_RUMPKERNEL) /* * ARMv6 has load-exclusive/store-exclusive which works for both user * and kernel. diff --git a/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_2.S b/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_2.S index 4bb35cefebb4..0d3639511504 100644 --- a/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_2.S +++ b/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_2.S @@ -1,4 +1,4 @@ -/* $NetBSD: sync_bool_compare_and_swap_2.S,v 1.1 2013/11/08 22:42:52 matt Exp $ */ +/* $NetBSD: sync_bool_compare_and_swap_2.S,v 1.2 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. * All rights reserved. @@ -30,7 +30,7 @@ #include "atomic_op_asm.h" -#if defined(_ARM_ARCH_6) +#if defined(_ARM_ARCH_6) && !defined(_RUMPKERNEL) /* * ARMv6 has load-exclusive/store-exclusive which works for both user * and kernel. diff --git a/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_4.S b/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_4.S index fc9a3da7d28f..e485ad4254ae 100644 --- a/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_4.S +++ b/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_4.S @@ -1,4 +1,4 @@ -/* $NetBSD: sync_bool_compare_and_swap_4.S,v 1.1 2013/11/08 22:42:52 matt Exp $ */ +/* $NetBSD: sync_bool_compare_and_swap_4.S,v 1.2 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -30,7 +30,7 @@ #include "atomic_op_asm.h" -#if defined(_ARM_ARCH_6) +#if defined(_ARM_ARCH_6) && !defined(_RUMPKERNEL) /* * ARMv6 has load-exclusive/store-exclusive which works for both user * and kernel. diff --git a/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_8.S b/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_8.S index c4da803d4721..9775c50f5cb2 100644 --- a/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_8.S +++ b/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_8.S @@ -1,4 +1,4 @@ -/* $NetBSD: sync_bool_compare_and_swap_8.S,v 1.2 2013/11/30 21:09:11 joerg Exp $ */ +/* $NetBSD: sync_bool_compare_and_swap_8.S,v 1.3 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -30,7 +30,7 @@ #include "atomic_op_asm.h" -#if defined(_ARM_ARCH_6) +#if defined(_ARM_ARCH_6) && !defined(_RUMPKERNEL) /* * ARMv6 has load-exclusive/store-exclusive which works for both user * and kernel. diff --git a/common/lib/libc/arch/arm/atomic/sync_fetch_and_add_8.S b/common/lib/libc/arch/arm/atomic/sync_fetch_and_add_8.S index f87f753ad297..cd7064352bba 100644 --- a/common/lib/libc/arch/arm/atomic/sync_fetch_and_add_8.S +++ b/common/lib/libc/arch/arm/atomic/sync_fetch_and_add_8.S @@ -1,4 +1,4 @@ -/* $NetBSD: sync_fetch_and_add_8.S,v 1.3 2014/06/23 21:53:45 joerg Exp $ */ +/* $NetBSD: sync_fetch_and_add_8.S,v 1.4 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "atomic_op_asm.h" -#ifdef _ARM_ARCH_6 +#if defined(_ARM_ARCH_6) && !defined(_RUMPKERNEL) ENTRY_NP(__sync_fetch_and_add_8) push {r4-r7} diff --git a/common/lib/libc/arch/arm/atomic/sync_fetch_and_and_8.S b/common/lib/libc/arch/arm/atomic/sync_fetch_and_and_8.S index 83e9bb1d2a70..9fc9e800705d 100644 --- a/common/lib/libc/arch/arm/atomic/sync_fetch_and_and_8.S +++ b/common/lib/libc/arch/arm/atomic/sync_fetch_and_and_8.S @@ -1,4 +1,4 @@ -/* $NetBSD: sync_fetch_and_and_8.S,v 1.3 2014/06/23 21:53:45 joerg Exp $ */ +/* $NetBSD: sync_fetch_and_and_8.S,v 1.4 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "atomic_op_asm.h" -#ifdef _ARM_ARCH_6 +#if defined(_ARM_ARCH_6) && !defined(_RUMPKERNEL) ENTRY_NP(__sync_fetch_and_and_8) push {r4-r7} diff --git a/common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S b/common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S index ee28b916f426..2fb6b5b2e88d 100644 --- a/common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S +++ b/common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S @@ -1,4 +1,4 @@ -/* $NetBSD: sync_fetch_and_nand_8.S,v 1.2 2013/11/30 21:09:11 joerg Exp $ */ +/* $NetBSD: sync_fetch_and_nand_8.S,v 1.3 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "atomic_op_asm.h" -#ifdef _ARM_ARCH_6 +#if defined(_ARM_ARCH_6) && !defined(_RUMPKERNEL) ENTRY_NP(__sync_fetch_and_nand_8) push {r4-r7} diff --git a/common/lib/libc/arch/arm/atomic/sync_fetch_and_or_8.S b/common/lib/libc/arch/arm/atomic/sync_fetch_and_or_8.S index 677bd0b0fbf0..86a1485f44db 100644 --- a/common/lib/libc/arch/arm/atomic/sync_fetch_and_or_8.S +++ b/common/lib/libc/arch/arm/atomic/sync_fetch_and_or_8.S @@ -1,4 +1,4 @@ -/* $NetBSD: sync_fetch_and_or_8.S,v 1.3 2014/06/23 21:53:45 joerg Exp $ */ +/* $NetBSD: sync_fetch_and_or_8.S,v 1.4 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "atomic_op_asm.h" -#ifdef _ARM_ARCH_6 +#if defined(_ARM_ARCH_6) && !defined(_RUMPKERNEL) ENTRY_NP(__sync_fetch_and_or_8) push {r4-r7} diff --git a/common/lib/libc/arch/arm/atomic/sync_fetch_and_sub_8.S b/common/lib/libc/arch/arm/atomic/sync_fetch_and_sub_8.S index 66becf307be2..3899b412abc7 100644 --- a/common/lib/libc/arch/arm/atomic/sync_fetch_and_sub_8.S +++ b/common/lib/libc/arch/arm/atomic/sync_fetch_and_sub_8.S @@ -1,4 +1,4 @@ -/* $NetBSD: sync_fetch_and_sub_8.S,v 1.3 2014/06/23 21:53:45 joerg Exp $ */ +/* $NetBSD: sync_fetch_and_sub_8.S,v 1.4 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "atomic_op_asm.h" -#ifdef _ARM_ARCH_6 +#if defined(_ARM_ARCH_6) && !defined(_RUMPKERNEL) ENTRY_NP(__sync_fetch_and_sub_8) push {r4-r7} diff --git a/common/lib/libc/arch/arm/atomic/sync_fetch_and_xor_8.S b/common/lib/libc/arch/arm/atomic/sync_fetch_and_xor_8.S index a0dc50e42672..3c4bee7e7a7d 100644 --- a/common/lib/libc/arch/arm/atomic/sync_fetch_and_xor_8.S +++ b/common/lib/libc/arch/arm/atomic/sync_fetch_and_xor_8.S @@ -1,4 +1,4 @@ -/* $NetBSD: sync_fetch_and_xor_8.S,v 1.3 2014/06/23 21:53:45 joerg Exp $ */ +/* $NetBSD: sync_fetch_and_xor_8.S,v 1.4 2015/05/17 20:57:11 justin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "atomic_op_asm.h" -#ifdef _ARM_ARCH_6 +#if defined(_ARM_ARCH_6) && !defined(_RUMPKERNEL) ENTRY_NP(__sync_fetch_and_xor_8) push {r4-r7} diff --git a/common/lib/libc/arch/arm/string/ffs.S b/common/lib/libc/arch/arm/string/ffs.S index d64013526a46..2d898b0234b3 100644 --- a/common/lib/libc/arch/arm/string/ffs.S +++ b/common/lib/libc/arch/arm/string/ffs.S @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.S,v 1.7 2014/01/23 11:45:46 martin Exp $ */ +/* $NetBSD: ffs.S,v 1.8 2015/05/17 20:57:12 justin Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert * All rights reserved. @@ -30,7 +30,7 @@ #include -RCSID("$NetBSD: ffs.S,v 1.7 2014/01/23 11:45:46 martin Exp $") +RCSID("$NetBSD: ffs.S,v 1.8 2015/05/17 20:57:12 justin Exp $") /* * ffs - find first set bit, this algorithm isolates the first set @@ -44,6 +44,7 @@ RCSID("$NetBSD: ffs.S,v 1.7 2014/01/23 11:45:46 martin Exp $") * This is the ffs algorithm devised by d.seal and posted to comp.sys.arm on * 16 Feb 1994. */ +#ifndef _RUMPKERNEL STRONG_ALIAS(__ffssi2,ffs) #if (defined(_ARM_ARCH_5) && !defined(__thumb__)) || defined(_ARM_ARCH_T2) #if defined(_ARM_ARCH_T2) @@ -90,3 +91,4 @@ ARM_ENTRY(ffs) .byte 30, 0, 23, 19, 29, 18, 17, 0 /* 56-63 */ END(ffs) #endif +#endif /* _RUMPKERNEL */