binutils: 2.21.51 Platform: AIX 3 5 000D1D5A4C00 powerpc-ibm-aix5.3.0.0 gcc version 4.3.3 (GCC) This is a re-introduction of a bug that was fixed in Bug 11742 - readelf.c: get_archive_member_name(): array subscript is above array bounds. The same patch works in this new file. gcc -DHAVE_CONFIG_H -I. -I. -I. -I../bfd -I./../bfd -I./../include -I./../intl -DLOCALEDIR="\"/mtg/tool/binutils-2.21.51/share/locale\"" -Dbin_dummy_emulation=bin_aix5_emulation -I/mtg/tool/gmp-5.0.1/powerpc-AIX5.3/include -I/mtg/tool/mpfr-3.0.0/include -I/mtg/tool/mpc-0.8.2/include -I/mtg/tool/include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -O3 -pipe -MT elfedit.o -MD -MP -MF .deps/elfedit.Tpo -c -o elfedit.o elfedit.c cc1: warnings being treated as errors elfedit.c: In function 'get_archive_member_name': elfedit.c:716: error: array subscript is above array bounds
Rather than patching elfedit.c, functions common to readelf.c and elfedit.c should be extracted to a new file.
A patch is posted at http://sourceware.org/ml/binutils/2010-11/msg00385.html
Fixed