This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Wrong address for static function in linux module

On Tue, Apr 11, 2006 at 11:01:13AM +0200, Jean-Rene Peulve wrote:
> Hi,
> I am debugging a linux module on a Coldfire and I encounter the following
> problem:
>  -functions which have the static attribut are always relocated at offset 0
>   of the .text section with the break command when the display command at 
>   the
>   right address disassemble the right static function.
>  -functions without the static attribut are relocated properly.
>  I found out that the psymtab entry for a static function is relocated at 
>  the
>  right offset in the .text section when the symtab entry for the same 
>  function
>  is relocated at offset 0 of the .text section.
>  To generate the target software, I use gcc 2.95.3
>  I was using gdb 5.2.1, then I fetch gdb- and get the same
>  problem.

This is normally supposed to be handled in
symfile_relocate_debug_section.  Are the bad functions really in
".text", or in another named text section?  Does the debug section
have proper relocations for that .debug_info entry (readelf -r)?

Daniel Jacobowitz

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]