This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Fix build with --enable-elf-stt-common
- From: Nix <nix at esperi dot org dot uk>
- To: binutils at sourceware dot org
- Date: Tue, 18 Nov 2008 16:56:21 +0000
- Subject: [PATCH] Fix build with --enable-elf-stt-common
The 2.19 build fails with
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/usr/packages/binutils/2.19/bfd -I. -DTRAD_CORE -I. -I/usr/packages/binutils/2.19/bfd -I/usr/packages/binutils/2.19/bfd/../include -D__NO_STRING_INLINES -D__NO_MATH_INLINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wstrict-overflow=1 -g -O2 -pipe -march=native -c /usr/packages/binutils/2.19/bfd/elf.c -fPIC -DPIC -o .libs/elf.o
/usr/packages/binutils/2.19/bfd/elf.c: In function 'swap_out_syms':
/usr/packages/binutils/2.19/bfd/elf.c:6419: error: expected expression before '}' token
The fix is obvious, if inelegant; however, this makes me wonder how
often --enable-elf-stt-common is tested. This bug was introduced in
*February* and there's no way compilation worked after that. Is this
configure option and related code dead?
2008-11-18 Nix <nix@esperi.org.uk>
* elf.c (swap_out_syms) [USE_STT_COMMON]: Fix syntax error.
Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.462.2.2
diff -u -r1.462.2.2 elf.c
--- elf.c 9 Oct 2008 01:03:17 -0000 1.462.2.2
+++ elf.c 18 Nov 2008 16:27:10 -0000
@@ -6413,9 +6413,8 @@
if (type == STT_OBJECT)
sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_COMMON);
else
-#else
- sym.st_info = ELF_ST_INFO (STB_GLOBAL, type);
#endif
+ sym.st_info = ELF_ST_INFO (STB_GLOBAL, type);
}
else if (bfd_is_und_section (syms[idx]->section))
sym.st_info = ELF_ST_INFO (((flags & BSF_WEAK)
--
`Not even vi uses vi key bindings for its command line.' --- PdS