From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19932 invoked by alias); 4 Nov 2005 20:37:26 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 19832 invoked by uid 22791); 4 Nov 2005 20:37:21 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: "Frank Ch. Eigler" Cc: systemtap@sources.redhat.com Subject: Re: inconsistent module relocation in elfutils In-Reply-To: Frank Ch. Eigler's message of Friday, 4 November 2005 15:08:13 -0500 <20051104200813.GA28901@redhat.com> X-Shopping-List: (1) Voracious axes (2) Abrupt beef (3) Seditious communion shrubbery (4) Capricious sock scenarios (5) Pelvic cards Message-Id: <20051104203715.AC7931809DC@magilla.sf.frob.com> Date: Fri, 04 Nov 2005 20:37:00 -0000 X-SW-Source: 2005-q4/txt/msg00149.txt.bz2 > Specifically, with some kernel versions (e.g. 2.6.13-1.1532_FC4) I > find that the GElf_Shdr sh_addr fields of .text-like sections are > correctly relocated, and for other kernel versions (2.6.9-22.EL), that > field is left at zero. Can you suggest an explanation or workaround? You should not have any particular expectations about section headers in ET_REL modules. The fact that you see an sh_addr you can use there is more an artifact of the implementation than something you should be relying on. When using the style of module callback now in use (-k), the only sections whose addresses are noted are those needed to relocate the debug info. > One can put a breakpoint at tapsets.cxx:1673 and look at variable "*shdr". I don't think that code is the right way to do that. Instead use dwfl_module_relocate_address and dwfl_module_relocation_info to get the section name.