Peter, Thanks for this.
Regards-- Subrata On Wed, 2009-03-25 at 12:07 +0000, Peter Oberparleiter wrote: > Update of /cvsroot/ltp/utils/analysis/gcov-kernel > In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31183 > > Added Files: > linux-2.6.29-gcov-arm-eabi.patch > linux-2.6.29-gcov-arm-hack.patch linux-2.6.29-gcov.patch > Log Message: > gcov-kernel: add patches for 2.6.29 > > > --- NEW FILE: linux-2.6.29-gcov-arm-eabi.patch --- > # > # gcov-kernel-2.6.29-1 (2008-03-25) > # > # [email protected]: > # We use GCC from Codesourcery, which is EABI compliant. It uses > # .init_array instead of .ctors for static constructors. It is a > # convention for C++ constructors than GCC uses. > # http://gcc.gnu.org/ml/gcc-patches/2005-04/msg02328.html > # > # [email protected]: > # I faced the same issue with 2.6.18 and done the > # following changes. it works fine. > # > # arch/arm/include/asm/elf.h | 1 + > # arch/arm/kernel/module.c | 1 + > # include/asm-generic/vmlinux.lds.h | 2 +- > # kernel/module.c | 2 +- > # 4 files changed, 4 insertions(+), 2 deletions(-) > # > > Index: linux-2.6.29/arch/arm/kernel/module.c > =================================================================== > --- linux-2.6.29.orig/arch/arm/kernel/module.c > +++ linux-2.6.29/arch/arm/kernel/module.c > @@ -105,6 +105,7 @@ apply_relocate(Elf32_Shdr *sechdrs, cons > > switch (ELF32_R_TYPE(rel->r_info)) { > case R_ARM_ABS32: > + case R_ARM_TARGET1: > *(u32 *)loc += sym->st_value; > break; > > Index: linux-2.6.29/arch/arm/include/asm/elf.h > =================================================================== > --- linux-2.6.29.orig/arch/arm/include/asm/elf.h > +++ linux-2.6.29/arch/arm/include/asm/elf.h > @@ -50,6 +50,7 @@ typedef struct user_fp elf_fpregset_t; > #define R_ARM_ABS32 2 > #define R_ARM_CALL 28 > #define R_ARM_JUMP24 29 > +#define R_ARM_TARGET1 38 > > /* > * These are used to set parameters in the core dumps. > Index: linux-2.6.29/include/asm-generic/vmlinux.lds.h > =================================================================== > --- linux-2.6.29.orig/include/asm-generic/vmlinux.lds.h > +++ linux-2.6.29/include/asm-generic/vmlinux.lds.h > @@ -448,7 +448,7 @@ > LONG((__CTOR_END__ - __CTOR_LIST__) / \ > (__CTOR_LIST2__ - __CTOR_LIST__) - 2) \ > __CTOR_LIST2__ = .; \ > - *(SORT(.ctors)) \ > + *(SORT(.init_array)) > \ > LONG(0) \ > __CTOR_END__ = .; \ > __DTOR_LIST__ = .; \ > Index: linux-2.6.29/kernel/module.c > =================================================================== > --- linux-2.6.29.orig/kernel/module.c > +++ linux-2.6.29/kernel/module.c > @@ -2090,7 +2090,7 @@ static noinline struct module *load_modu > #endif > > #ifdef CONFIG_GCOV_PROFILE > - modindex = find_sec(hdr, sechdrs, secstrings, ".ctors"); > + modindex = find_sec(hdr, sechdrs, secstrings, ".init_array"); > mod->ctors_start = (char *)sechdrs[modindex].sh_addr; > mod->ctors_end = (char *)(mod->ctors_start + > sechdrs[modindex].sh_size); > > --- NEW FILE: linux-2.6.29-gcov-arm-hack.patch --- > # > # gcov-kernel-2.6.29-1 (2008-03-25) > # > # [email protected]: > # The following parts of the kernel code had coverage disabled by > # default for now (on ARM platform only) because they consistently cause > # kernel problems: > # > # arch/arm/nwfpe/: make FP operations results go wrong > # fs/: soft lockup at the end of kernel boot > # fs/nfs/: generates BUG_ON() in net/sunrpc/xdr.c when mounting NFS root > # lib/: kernel hangs right after decompression > # mm/: many commands fail with "File size limit exceeded" > # net/ipv4/: NFS root mount fails > # > # TODO: find the specific problematic .c files files in these > # directories and either (a) fix the buggy code or (b) disable coverage > # for those specific file(s) using "CFLAGS_file.o". > # > # arch/arm/nwfpe/Makefile | 3 +++ > # fs/Makefile | 3 +++ > # fs/nfs/Makefile | 3 +++ > # lib/Makefile | 3 +++ > # mm/Makefile | 3 +++ > # net/ipv4/Makefile | 3 +++ > # 6 files changed, 18 insertions(+) > # > > Index: linux-2.6.29/arch/arm/nwfpe/Makefile > =================================================================== > --- linux-2.6.29.orig/arch/arm/nwfpe/Makefile > +++ linux-2.6.29/arch/arm/nwfpe/Makefile > @@ -1,6 +1,9 @@ > # > # Copyright (C) 1998, 1999, 2001 Philip Blundell > # > +ifeq ($(CONFIG_ARM),y) > +KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV) > +endif > > obj-$(CONFIG_FPE_NWFPE) += nwfpe.o > > Index: linux-2.6.29/fs/Makefile > =================================================================== > --- linux-2.6.29.orig/fs/Makefile > +++ linux-2.6.29/fs/Makefile > @@ -4,6 +4,9 @@ > # 14 Sep 2000, Christoph Hellwig <[email protected]> > # Rewritten to use lists instead of if-statements. > # > +ifeq ($(CONFIG_ARM),y) > +KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV) > +endif > > obj-y := open.o read_write.o file_table.o super.o \ > char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ > Index: linux-2.6.29/fs/nfs/Makefile > =================================================================== > --- linux-2.6.29.orig/fs/nfs/Makefile > +++ linux-2.6.29/fs/nfs/Makefile > @@ -1,6 +1,9 @@ > # > # Makefile for the Linux nfs filesystem routines. > # > +ifeq ($(CONFIG_ARM),y) > +KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV) > +endif > > obj-$(CONFIG_NFS_FS) += nfs.o > > Index: linux-2.6.29/lib/Makefile > =================================================================== > --- linux-2.6.29.orig/lib/Makefile > +++ linux-2.6.29/lib/Makefile > @@ -1,6 +1,9 @@ > # > # Makefile for some libs needed in the kernel. > # > +ifeq ($(CONFIG_ARM),y) > +KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV) > +endif > > ifdef CONFIG_FUNCTION_TRACER > ORIG_CFLAGS := $(KBUILD_CFLAGS) > Index: linux-2.6.29/mm/Makefile > =================================================================== > --- linux-2.6.29.orig/mm/Makefile > +++ linux-2.6.29/mm/Makefile > @@ -1,6 +1,9 @@ > # > # Makefile for the linux memory manager. > # > +ifeq ($(CONFIG_ARM),y) > +KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV) > +endif > > mmu-y := nommu.o > mmu-$(CONFIG_MMU) := fremap.o highmem.o madvise.o memory.o mincore.o \ > Index: linux-2.6.29/net/ipv4/Makefile > =================================================================== > --- linux-2.6.29.orig/net/ipv4/Makefile > +++ linux-2.6.29/net/ipv4/Makefile > @@ -1,6 +1,9 @@ > # > # Makefile for the Linux TCP/IP (INET) layer. > # > +ifeq ($(CONFIG_ARM),y) > +KBUILD_CFLAGS := $(KBUILD_CFLAGS_NOGCOV) > +endif > > obj-y := route.o inetpeer.o protocol.o \ > ip_input.o ip_fragment.o ip_forward.o ip_options.o \ > > --- NEW FILE: linux-2.6.29-gcov.patch --- > # > # gcov-kernel-2.6.29-1 (2009-03-25) > # Provides GCOV code coverage infrastructure for Linux kernel 2.6.29. > # See http://ltp.sourceforge.net/coverage/gcov.php for details. > # > # Set the following in .config file for 2.6.29: > # CONFIG_GCOV_PROFILE=y > # CONFIG_GCOV_ALL=y > # CONFIG_GCOV_PROC=m > # CONFIG_GCOV_HAMMER=n > # > # Makefile | 20 > # arch/arm/boot/compressed/Makefile | 1 > # arch/powerpc/kernel/vmlinux.lds.S | 4 > # arch/s390/kernel/vdso32/Makefile | 2 > # arch/s390/kernel/vdso64/Makefile | 2 > # arch/x86/kernel/Makefile | 3 > # include/asm-generic/vmlinux.lds.h | 18 > # include/linux/gcov.h | 243 ++++ > [...3081 lines suppressed...] > KBUILD_AFLAGS_31 += -m31 -s > > -KBUILD_CFLAGS_31 := $(filter-out -m64,$(KBUILD_CFLAGS)) > +KBUILD_CFLAGS_31 := $(filter-out -m64 $(KBUILD_GCOV_FLAGS),$(KBUILD_CFLAGS)) > KBUILD_CFLAGS_31 += -m31 -fPIC -shared -fno-common -fno-builtin > KBUILD_CFLAGS_31 += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ > $(call ld-option, -Wl$(comma)--hash-style=sysv) > Index: linux-2.6.29/arch/s390/kernel/vdso64/Makefile > =================================================================== > --- linux-2.6.29.orig/arch/s390/kernel/vdso64/Makefile > +++ linux-2.6.29/arch/s390/kernel/vdso64/Makefile > @@ -10,7 +10,7 @@ obj-vdso64 := $(addprefix $(obj)/, $(obj > KBUILD_AFLAGS_64 := $(filter-out -m64,$(KBUILD_AFLAGS)) > KBUILD_AFLAGS_64 += -m64 -s > > -KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS)) > +KBUILD_CFLAGS_64 := $(filter-out -m64 $(KBUILD_GCOV_FLAGS),$(KBUILD_CFLAGS)) > KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin > KBUILD_CFLAGS_64 += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ > $(call ld-option, -Wl$(comma)--hash-style=sysv) > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Ltp-cvs mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ltp-cvs ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
