This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: readelf: Print sh_flags in hex


On Sat, Aug 13, 2005 at 07:50:11PM -0400, John David Anglin wrote:
> This following change breaks the build of readelf on hppa2.0w-hp-hpux11.11:
> 
> 2005-08-10  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* readelf.c (do_full_section_name): Renamed to ...
> 	(do_section_details): This.
> 	(option): Rename "-N/--full-section-name" to
> 	"-f/--section-details".
> 	(usage): Likewise.
> 	(parse_args): Likewise.
> 	(get_elf_section_flags): Support do_section_details.
> 	(process_section_headers): Updated for do_section_details.
> 
> gcc -DHAVE_CONFIG_H -I. -I../../src/binutils -I. -D_GNU_SOURCE -I. -I../../src/b
> inutils -I../bfd -I../../src/binutils/../bfd -I../../src/binutils/../include -DH
> OST_HPPAHPUX -D_LARGEFILE64_SOURCE -I../../src/binutils/../intl -I../intl -DLOCA
> LEDIR="\"/opt/gnu/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation  -
> D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -
> O2 -c ../../src/binutils/readelf.c
> cc1: warnings being treated as errors
> ../../src/binutils/readelf.c: In function 'get_elf_section_flags':
> ../../src/binutils/readelf.c:3862: warning: implicit declaration of function 'st
> pcpy'
> ../../src/binutils/readelf.c:3862: warning: incompatible implicit declaration of
>  built-in function 'stpcpy'
> 

Can you try this patch?


H.J.
--
2005-08-13  H.J. Lu  <hongjiu.lu@intel.com>

	* bucomm.h (stpcpy): Declare if HAVE_DECL_STPCPY isn't defined.

	* configure.in (AC_GNU_SOURCE): Added.
	(AC_CHECK_DECLS): Add stpcpy.
	* configure: Regenerated.

--- binutils/bucomm.h.stp	2005-07-08 08:37:02.000000000 -0700
+++ binutils/bucomm.h	2005-08-13 16:59:51.000000000 -0700
@@ -68,6 +68,10 @@ extern char *strrchr ();
 #endif
 #endif
 
+#if !HAVE_DECL_STPCPY
+extern char *stpcpy (char *__dest, const char *__src);
+#endif
+
 #if !HAVE_DECL_STRSTR
 extern char *strstr ();
 #endif
--- binutils/configure.in.stp	2005-07-06 07:14:47.000000000 -0700
+++ binutils/configure.in	2005-08-13 17:04:46.000000000 -0700
@@ -41,6 +41,7 @@ if test -z "$host" ; then
 fi
 
 AC_PROG_CC
+AC_GNU_SOURCE
 
 AC_PROG_YACC
 AM_PROG_LEX
@@ -182,7 +183,7 @@ if test $bu_cv_header_utime_h = yes; the
   AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?])
 fi
 
-AC_CHECK_DECLS([fprintf, strstr, sbrk, getenv, environ, getc_unlocked])
+AC_CHECK_DECLS([fprintf, stpcpy, strstr, sbrk, getenv, environ, getc_unlocked])
 
 BFD_BINARY_FOPEN
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]