Re: Questions on __initdata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dnia poniedziałek, 5 grudnia 2005 21:37, Ralf Baechle napisał:

> blurb.c: At top level:
> blurb.c:3: error: somevariable causes a section type conflict

This was a gcc bug. The current gcc mainline works fine.

-- 
to_be || !to_be == 1, to_be | ~to_be == -1
	.file	"id.c"
	.section	.initdata,"aw",@progbits
	.align 4
	.type	somevariable.0, @object
	.size	somevariable.0, 4
somevariable.0:
	.zero	4
	.section	.inittext,"ax",@progbits
	.p2align 4,,15
.globl somefunc
	.type	somefunc, @function
somefunc:
	movl	somevariable.0, %edx
	addl	%edx, %eax
	movl	%eax, somevariable.0
	ret
	.size	somefunc, .-somefunc
	.section	.note.GNU-stack,"",@progbits
	.ident	"GCC: (GNU) 3.3.6 (PLD Linux)"
	.file	"id.c"
	.section	.inittext,"ax",@progbits
	.p2align 4,,15
.globl somefunc
	.type	somefunc, @function
somefunc:
	addl	somevariable.1299, %eax
	movl	%eax, somevariable.1299
	ret
	.size	somefunc, .-somefunc
	.section	.initdata,"aw",@progbits
	.align 4
	.type	somevariable.1299, @object
	.size	somevariable.1299, 4
somevariable.1299:
	.zero	4
	.ident	"GCC: (GNU) 4.2.0 20051201 (experimental)"
	.section	.note.GNU-stack,"",@progbits
int __attribute__((section(".inittext"))) somefunc(int x)
{
    static int __attribute__((section(".initdata"))) somevariable;
    somevariable += x;
    return somevariable;
}

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux