Message ID | 1322640403-9927-1-git-send-email-macpaul@andestech.com |
---|---|
State | Superseded |
Delegated to: | Macpaul Lin |
Headers | show |
On Wednesday 30 November 2011 03:06:42 Macpaul Lin wrote:
> Add linkage support.
let's add this to our linux/linkage.h:
#ifndef __ALIGN
#define __ALIGN .align 4
#define __ALIGN_STR ".align 4"
#endif
i think most arches will be this way
-mike
Hi Mike, 2011/12/1 Mike Frysinger <vapier@gentoo.org> > On Wednesday 30 November 2011 03:06:42 Macpaul Lin wrote: > > Add linkage support. > > let's add this to our linux/linkage.h: > #ifndef __ALIGN > #define __ALIGN .align 4 > #define __ALIGN_STR ".align 4" > #endif > > i think most arches will be this way > -mike > I'm not sure for this because I've found there exists different configurations for other architectures in Linux. For example, ../../../arch/arm/include/asm/linkage.h:4:#define __ALIGN .align 0 ../../../arch/arm/include/asm/linkage.h:5:#define __ALIGN_STR ".align 0" ../../../arch/avr32/include/asm/linkage.h:4:#define __ALIGN .balign 2 ../../../arch/avr32/include/asm/linkage.h:5:#define __ALIGN_STR ".balign 2" ../../../arch/score/include/asm/linkage.h:4:#define __ALIGN .align 2 ../../../arch/score/include/asm/linkage.h:5:#define __ALIGN_STR ".align 2"
On Wednesday 30 November 2011 21:29:02 Macpaul Lin wrote: > 2011/12/1 Mike Frysinger <vapier@gentoo.org> > > On Wednesday 30 November 2011 03:06:42 Macpaul Lin wrote: > > > Add linkage support. > > > > let's add this to our linux/linkage.h: > > #ifndef __ALIGN > > #define __ALIGN .align 4 > > #define __ALIGN_STR ".align 4" > > #endif > > > > i think most arches will be this way > > I'm not sure for this because I've found there exists different > configurations for other > architectures in Linux. more than half will use ".align 4". for the few that do not, they can still define __ALIGN themselves, and thus the "#ifndef __ALIGN" i quoted above will keep it from executing. -mike
Hi Mike, > more than half will use ".align 4". for the few that do not, they can > still > define __ALIGN themselves, and thus the "#ifndef __ALIGN" i quoted above > will > keep it from executing. > -mike > Good! I will fix this up ASAP. :-)
diff --git a/arch/nds32/include/asm/linkage.h b/arch/nds32/include/asm/linkage.h new file mode 100644 index 0000000..9d6edd9 --- /dev/null +++ b/arch/nds32/include/asm/linkage.h @@ -0,0 +1,31 @@ +/* + * U-boot - linkage.h + * + * Copyright (c) 2005-2007 Analog Devices Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#ifndef __ASM_LINKAGE_H +#define __ASM_LINKAGE_H + +#define __ALIGN .align 4 +#define __ALIGN_STR ".align 4" + +#endif
Add linkage support. Signed-off-by: Macpaul Lin <macpaul@andestech.com> --- arch/nds32/include/asm/linkage.h | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/linkage.h