This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Strange reporting of symbol addresses for a Windows DLL
- To: cgf at redhat dot com
- Subject: Re: Strange reporting of symbol addresses for a Windows DLL
- From: Nick Clifton <nickc at redhat dot com>
- Date: Thu, 8 Feb 2001 14:55:11 -0800
- CC: binutils at sources dot redhat dot com
Hi Chris,
: ftp://ftp.cygnus.com/pub/home/cgf/new-cygwin1.dll.bz2
Thanks.
It appears that the second addition is happening in
_bfd_pe_get_symbol_info. The patch below gives the correct numbers
and does not appear to introduce any bew failures. Please give it a
try and let me know how it goes.
Cheers
Nick
Index: bfd/peigen.c
===================================================================
RCS file: /cvs/src//src/bfd/peigen.c,v
retrieving revision 1.15
diff -p -r1.15 peigen.c
*** peigen.c 2000/12/14 21:38:30 1.15
--- peigen.c 2001/02/08 22:50:56
*************** _bfd_pe_get_symbol_info (abfd, symbol, r
*** 1958,1969 ****
symbol_info *ret;
{
coff_get_symbol_info (abfd, symbol, ret);
!
if (pe_data (abfd) != NULL
&& ((symbol->flags & BSF_DEBUGGING) == 0
|| (symbol->flags & BSF_DEBUGGING_RELOC) != 0)
&& ! bfd_is_abs_section (symbol->section))
ret->value += pe_data (abfd)->pe_opthdr.ImageBase;
}
/* Handle the .idata section and other things that need symbol table
--- 1958,1971 ----
symbol_info *ret;
{
coff_get_symbol_info (abfd, symbol, ret);
! #if 0 /* This code no longer appears to be necessary.
! ImageBase has already been added in by coff_swap_scnhdr_in. */
if (pe_data (abfd) != NULL
&& ((symbol->flags & BSF_DEBUGGING) == 0
|| (symbol->flags & BSF_DEBUGGING_RELOC) != 0)
&& ! bfd_is_abs_section (symbol->section))
ret->value += pe_data (abfd)->pe_opthdr.ImageBase;
+ #endif
}
/* Handle the .idata section and other things that need symbol table