All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paweł Sikora" <pluto@agmk.net>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Jean Delvare <khali@linux-fr.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: Questions on __initdata
Date: Tue, 6 Dec 2005 14:32:12 +0100	[thread overview]
Message-ID: <200512061432.12693.pluto@agmk.net> (raw)
In-Reply-To: <20051205203730.GA2753@linux-mips.org>

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

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

[-- Attachment #2: id-336.s --]
[-- Type: text/plain, Size: 426 bytes --]

	.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)"

[-- Attachment #3: id-420.s --]
[-- Type: text/plain, Size: 436 bytes --]

	.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

[-- Attachment #4: id.c --]
[-- Type: text/x-csrc, Size: 177 bytes --]

int __attribute__((section(".inittext"))) somefunc(int x)
{
    static int __attribute__((section(".initdata"))) somevariable;
    somevariable += x;
    return somevariable;
}

  reply	other threads:[~2005-12-06 13:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-04 14:15 Questions on __initdata Jean Delvare
2005-12-04 16:41 ` Arnd Bergmann
2005-12-05 20:37   ` Ralf Baechle
2005-12-06 13:32     ` Paweł Sikora [this message]
2005-12-06 13:48       ` Ralf Baechle
2005-12-06  4:42 ` Keith Owens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200512061432.12693.pluto@agmk.net \
    --to=pluto@agmk.net \
    --cc=arnd@arndb.de \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.