Subject: Re: __RCSID() and .text section
To: Simon Burge <simonb@wasabisystems.com>
From: Rafal Boni <rafal@pobox.com>
List: tech-userlevel
Date: 07/29/2003 20:03:16
In message <20030729235438.GA5836@thistledown.com.au>, you write:
-> 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?
Jason and I had talked about this a while back and I thought there were
some possibly negative repercussions of .pushsection and .popsection, so
when I fixed this in some work code that uses the RCSID macros, I simply
used .previous. I can't recall what the exact issue with the .push/.pop
was, though.
--rafal
----
Rafal Boni rafal@pobox.com
We are all worms. But I do believe I am a glowworm. -- Winston Churchill