diff options
author | Nick Clifton <nickc@redhat.com> | 2010-04-27 14:42:50 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-04-27 14:42:50 +0000 |
commit | 4d9e2b2774bad5d56d5bd8a232b8bdf64c10bd13 (patch) | |
tree | 41924e052dcefb65c1629899b288aee0689794ff | |
parent | 4ba3f0345f0f4a807d7327ffd93b8f43b7d6fefc (diff) | |
download | fsf-binutils-gdb-4d9e2b2774bad5d56d5bd8a232b8bdf64c10bd13.zip fsf-binutils-gdb-4d9e2b2774bad5d56d5bd8a232b8bdf64c10bd13.tar.gz fsf-binutils-gdb-4d9e2b2774bad5d56d5bd8a232b8bdf64c10bd13.tar.bz2 |
PR binutils/11512
* coffgen.c (coff_find_nearest_line): Incldue the section address
of function name symbols in address comparisons.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/coffgen.c | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3d9da9b..411e043 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2010-04-27 Nick Clifton <nickc@redhat.com> + PR binutils/11512 + * coffgen.c (coff_find_nearest_line): Incldue the section address + of function name symbols in address comparisons. + +2010-04-27 Nick Clifton <nickc@redhat.com> + * po/fr.po: Updated French translation. 2010-04-23 Alan Modra <amodra@gmail.com> diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 63053a1..fc82d57 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -2152,6 +2152,7 @@ coff_find_nearest_line (bfd *abfd, maxdiff = (bfd_vma) 0 - (bfd_vma) 1; while (1) { + bfd_vma file_addr; combined_entry_type *p2; for (p2 = p + 1 + p->u.syment.n_numaux; @@ -2170,11 +2171,16 @@ coff_find_nearest_line (bfd *abfd, } } + file_addr = (bfd_vma) p2->u.syment.n_value; + /* PR 11512: Include the section address of the function name symbol. */ + if (p2->u.syment.n_scnum > 0) + file_addr += coff_section_from_bfd_index (abfd, + p2->u.syment.n_scnum)->vma; /* We use <= MAXDIFF here so that if we get a zero length file, we actually use the next file entry. */ if (p2 < pend - && offset + sec_vma >= (bfd_vma) p2->u.syment.n_value - && offset + sec_vma - (bfd_vma) p2->u.syment.n_value <= maxdiff) + && offset + sec_vma >= file_addr + && offset + sec_vma - file_addr <= maxdiff) { *filename_ptr = (char *) p->u.syment._n._n_n._n_offset; maxdiff = offset + sec_vma - p2->u.syment.n_value; |