X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gprof%2Fsymtab.c;h=9ebcfa2adfa8349cac053b06bc9c62cddfeeeeb6;hb=3d3424e9a8d6ad56160b98bf6e223c0346164468;hp=05568d18d9ea0aec82fb413c7e6872deb4ccf95a;hpb=3e8f6abf1e13bfd39a48b297f2679f5dd5fe6a3a;p=deliverable%2Fbinutils-gdb.git diff --git a/gprof/symtab.c b/gprof/symtab.c index 05568d18d9..9ebcfa2adf 100644 --- a/gprof/symtab.c +++ b/gprof/symtab.c @@ -1,12 +1,12 @@ /* symtab.c - Copyright 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of GNU Binutils. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ #include "gprof.h" #include "search_list.h" @@ -148,7 +148,8 @@ symtab_finalize (Sym_Table *tab) } if (tab->len > 0 && dst[-1].end_addr == 0) - dst[-1].end_addr = core_text_sect->vma + core_text_sect->_raw_size - 1; + dst[-1].end_addr + = core_text_sect->vma + bfd_get_section_size (core_text_sect) - 1; DBG (AOUTDEBUG | IDDEBUG, printf ("[symtab_finalize]: removed %d duplicate entries\n", @@ -163,8 +164,9 @@ symtab_finalize (Sym_Table *tab) for (j = 0; j < tab->len; ++j) { printf ("[symtab_finalize] 0x%lx-0x%lx\t%s\n", - (long) tab->base[j].addr, (long) tab->base[j].end_addr, - tab->base[j].name); + (unsigned long) tab->base[j].addr, + (unsigned long) tab->base[j].end_addr, + tab->base[j].name); } ); } @@ -175,7 +177,7 @@ symtab_finalize (Sym_Table *tab) Sym * dbg_sym_lookup (Sym_Table *sym_tab, bfd_vma address) { - long low, mid, high; + unsigned long low, mid, high; Sym *sym; fprintf (stderr, "[dbg_sym_lookup] address 0x%lx\n",