diff options
author | Alan Modra <amodra@gmail.com> | 2002-09-21 09:59:19 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-09-21 09:59:19 +0000 |
commit | 5ad8645cf8d41991011e0ba4d274400231c61c35 (patch) | |
tree | 17481c63405ebff1ae7a01698ae5ff3b8ebf8d59 | |
parent | 96ea7171296a44988b723f27364558c41c979396 (diff) | |
download | gdb-5ad8645cf8d41991011e0ba4d274400231c61c35.zip gdb-5ad8645cf8d41991011e0ba4d274400231c61c35.tar.gz gdb-5ad8645cf8d41991011e0ba4d274400231c61c35.tar.bz2 |
* elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
unsigned. Move "symcount" assignment out of loop.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
* configure: Regenerate.
* po/SRC-POTFILES.in: Regnerate.
-rw-r--r-- | bfd/ChangeLog | 9 | ||||
-rw-r--r-- | bfd/Makefile.am | 20 | ||||
-rw-r--r-- | bfd/Makefile.in | 15 | ||||
-rwxr-xr-x | bfd/configure | 30 | ||||
-rw-r--r-- | bfd/elfcode.h | 12 | ||||
-rw-r--r-- | bfd/po/SRC-POTFILES.in | 8 |
6 files changed, 64 insertions, 30 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1bb5aa5..4f97925 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2002-09-21 Alan Modra <amodra@bigpond.net.au> + + * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount" + unsigned. Move "symcount" assignment out of loop. + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + * configure: Regenerate. + * po/SRC-POTFILES.in: Regnerate. + 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu> * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is diff --git a/bfd/Makefile.am b/bfd/Makefile.am index cb57074..0aa98e3 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -1168,10 +1168,10 @@ elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-i386-fbsd.lo: elf32-i386-fbsd.c elf32-i386.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-i386-fbsd.lo: elf32-i386-fbsd.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-i386.c \ + $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ @@ -1533,13 +1533,13 @@ elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ libecoff.h ecoffswap.h elf64-target.h -elf64-alpha-fbsd.lo: elf64-alpha-fbsd.c elf64-alpha.c $(INCDIR)/filenames.h \ +elf64-alpha-fbsd.lo: elf64-alpha-fbsd.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/alpha.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ - $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ - libecoff.h ecoffswap.h elf64-target.h + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf64-alpha.c \ + $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \ + libcoff.h libecoff.h ecoffswap.h elf64-target.h elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 2da51c8..4816c17 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -344,6 +344,7 @@ BFD32_BACKENDS = \ elf32-hppa.lo \ elf32-i370.lo \ elf32-i386.lo \ + elf32-i386-fbsd.lo \ elf32-i386qnx.lo \ elf32-i860.lo \ elf32-i960.lo \ @@ -507,6 +508,7 @@ BFD32_BACKENDS_CFILES = \ elf32-hppa.c \ elf32-i370.c \ elf32-i386.c \ + elf32-i386-fbsd.c \ elf32-i386qnx.c \ elf32-i860.c \ elf32-i960.c \ @@ -617,6 +619,7 @@ BFD64_BACKENDS = \ efi-app-ia64.lo \ elf64-x86-64.lo \ elf64-alpha.lo \ + elf64-alpha-fbsd.lo \ elf64-hppa.lo \ elf64-ia64.lo \ elf64-gen.lo \ @@ -644,6 +647,7 @@ BFD64_BACKENDS_CFILES = \ efi-app-ia64.c \ elf64-x86-64.c \ elf64-alpha.c \ + elf64-alpha-fbsd.c \ elf64-hppa.c \ elf64-gen.c \ elfn32-mips.c \ @@ -1694,6 +1698,10 @@ elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h +elf32-i386-fbsd.lo: elf32-i386-fbsd.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-i386.c \ + $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ @@ -2055,6 +2063,13 @@ elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ libecoff.h ecoffswap.h elf64-target.h +elf64-alpha-fbsd.lo: elf64-alpha-fbsd.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf64-alpha.c \ + $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \ + libcoff.h libecoff.h ecoffswap.h elf64-target.h elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ diff --git a/bfd/configure b/bfd/configure index f41efc7..2ca10f7 100755 --- a/bfd/configure +++ b/bfd/configure @@ -6075,6 +6075,7 @@ do bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; + bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386-fbsd.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; bfd_elf32_i386qnx_vec) tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;; bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; @@ -6133,6 +6134,7 @@ do bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; + bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha-fbsd.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; @@ -6338,10 +6340,10 @@ case ${host64}-${target64}-${want64} in if test -n "$GCC" ; then bad_64bit_gcc=no; echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6 -echo "configure:6342: checking for gcc version with buggy 64-bit support" >&5 +echo "configure:6344: checking for gcc version with buggy 64-bit support" >&5 # Add more tests for gcc versions with non-working 64-bit support here. cat > conftest.$ac_ext <<EOF -#line 6345 "configure" +#line 6347 "configure" #include "confdefs.h" :__GNUC__:__GNUC_MINOR__:__i386__: EOF @@ -6386,17 +6388,17 @@ for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6390: checking for $ac_hdr" >&5 +echo "configure:6392: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6395 "configure" +#line 6397 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6425,12 +6427,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6429: checking for $ac_func" >&5 +echo "configure:6431: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6434 "configure" +#line 6436 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6453,7 +6455,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6478,7 +6480,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6482: checking for working mmap" >&5 +echo "configure:6484: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6486,7 +6488,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 6490 "configure" +#line 6492 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -6639,7 +6641,7 @@ main() } EOF -if { (eval echo configure:6643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -6664,12 +6666,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6668: checking for $ac_func" >&5 +echo "configure:6670: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6673 "configure" +#line 6675 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6692,7 +6694,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff --git a/bfd/elfcode.h b/bfd/elfcode.h index ca72307..4f54cd3 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -1377,7 +1377,7 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, arelent *relent; unsigned int i; int entsize; - long symcount; + unsigned int symcount; allocated = (PTR) bfd_malloc (rel_hdr->sh_size); if (allocated == NULL) @@ -1394,6 +1394,11 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, BFD_ASSERT (entsize == sizeof (Elf_External_Rel) || entsize == sizeof (Elf_External_Rela)); + if (dynamic) + symcount = bfd_get_dynamic_symcount (abfd); + else + symcount = bfd_get_symcount (abfd); + for (i = 0, relent = relents; i < reloc_count; i++, relent++, native_relocs += entsize) @@ -1420,11 +1425,6 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, else relent->address = rela.r_offset - asect->vma; - if (dynamic) - symcount = bfd_get_dynamic_symcount (abfd); - else - symcount = bfd_get_symcount (abfd); - if (ELF_R_SYM (rela.r_info) == 0) relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; else if (ELF_R_SYM (rela.r_info) > symcount) diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in index 4c32ca0..27ce9a9 100644 --- a/bfd/po/SRC-POTFILES.in +++ b/bfd/po/SRC-POTFILES.in @@ -45,6 +45,7 @@ coff-sparc.c coff-stgo32.c coff-svm68k.c coff-tic30.c +coff-tic4x.c coff-tic54x.c coff-tic80.c coff-u68k.c @@ -98,6 +99,7 @@ cpu-s390.c cpu-sh.c cpu-sparc.c cpu-tic30.c +cpu-tic4x.c cpu-tic54x.c cpu-tic80.c cpu-v850.c @@ -135,6 +137,7 @@ elf32-h8300.c elf32-hppa.c elf32-hppa.h elf32-i370.c +elf32-i386-fbsd.c elf32-i386.c elf32-i386qnx.c elf32-i860.c @@ -151,6 +154,7 @@ elf32-openrisc.c elf32-or32.c elf32-pj.c elf32-ppc.c +elf32-ppcqnx.c elf32-s390.c elf32-sh-lin.c elf32-sh-nbsd.c @@ -158,11 +162,13 @@ elf32-sh.c elf32-sh64-com.c elf32-sh64-nbsd.c elf32-sh64.c +elf32-shqnx.c elf32-sparc.c elf32-v850.c elf32-vax.c elf32-xstormy16.c elf32.c +elf64-alpha-fbsd.c elf64-alpha.c elf64-gen.c elf64-hppa.c @@ -178,10 +184,12 @@ elf64-x86-64.c elf64.c elfarm-nabi.c elfarm-oabi.c +elfarmqnx-nabi.c elfcode.h elfcore.h elflink.c elflink.h +elfn32-mips.c elfxx-mips.c epoc-pe-arm.c epoc-pei-arm.c |