Subject: Re: __RCSID() and .text section
To: Jun-ichiro itojun Hagino <itojun@iijlab.net>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-userlevel
Date: 07/30/2003 09:54:38
On Wed, Jul 30, 2003 at 08:16:35AM +0900, Jun-ichiro itojun Hagino wrote:

> 	see PR 22277.  some of integer variables are put into .text region
> 	and causes SEGV (because .text section is not writable), i guess
> 	this is because of __RCSID().  any clues on how to solve this?
> 	i'll disable __RCSID() for now.

It looks like all the

	.section foo ; .... ; .text

in <sys/cdefs*.h> (or at least <sys/cdefs_elf.h>) should be

	.pushsection foo ; .... ; .popsection

Doing this ends up with:

	Disassembly of section .data:
		...
	00000024 <incstackp>:
	  24:   00 00                   add    %al,(%eax)
		...

Anyone more familiar with binutils care to comment?

Simon.
--
Simon Burge                                   <simonb@wasabisystems.com>
NetBSD Development, Support and Service:   http://www.wasabisystems.com/