diff --git a/CONTRIBUTING b/CONTRIBUTING index f267a544d208e15adfde267180251d56152ccff5..e3d5a0f789f205e4db6f58f5b6bebfd19a167e78 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -1,11 +1,14 @@ -The project homepage is at https://fedorahosted.org/elfutils/ +The project home is http://elfutils.org/ The current elfutils source code can be checked out with -git clone git://git.fedorahosted.org/git/elfutils.git +git clone git://sourceware.org/git/elfutils.git The developer mailinglist to send patches to is -elfutils-devel@lists.fedorahosted.org. -https://fedorahosted.org/mailman/listinfo/elfutils-devel +elfutils-devel@sourceware.org. +https://sourceware.org/ml/elfutils-devel/ + +To subscribe send an email to elfutils-devel-subscribe@sourceware.org +Or use the form at https://sourceware.org/lists.html#ml-requestor Please supply patches using git format-patch or using git send-email. @@ -66,20 +69,22 @@ After sending your patch to the mailinglist one of the committers to the project will review it, give feedback, and if perfect they will commit it for you. -The current maintainers/committers can be found at: -https://admin.fedoraproject.org/accounts/group/members/gitelfutils/* - You can become a maintainer/committer yourself after you have provided at least a handful of accepted patches and agree to the guidelines in this document for creating, reviewing, accepting and committing patches. -To become a committer you need an FAS account at: -https://admin.fedoraproject.org/accounts/ +To become a committer you need a sourceware account: +https://sourceware.org/cgi-bin/pdw/ps_form.cgi Upload a SSH public key and have an existing maintainer sponsor you -for the Elf Utils Group (gitelfutils). +for the elfutils group. committers can push patches through: -ssh://<fasname>@git.fedorahosted.org/git/elfutils.git +ssh://<user>@sourceware.org/git/elfutils.git + +The current webpages published at https://sourceware.org/elfutils/ +can be checked out with: +git clone ssh://<user>@sourceware.org/git/elfutils-htdocs.git +Patches should also be posted to the mailinglist. As a maintainer/committer you should still post patches as described above. And ideally they are reviewed and approved as above. If no @@ -88,7 +93,7 @@ you may use your own judgement whether you ping your patch or push it after "self-review". If you do, you should post a message to the mailinglist that the patch has been pushed. -committers may also create git branches starting with <fasname>/... +committers may also create git branches starting with <nickname>/... patches on these branches are works in progress, so might not be perfect yet, but should follow the above guidelines as much as possible and should be aimed at integration into master. For merging a branch into master diff --git a/ChangeLog b/ChangeLog index c7e2a2ab94b32e122daa04c215bf5da8d1e085f8..63eca76b726b1d9cd09b1c16da60e5c3329f1b7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2016-12-24 Mark Wielaard <mark@klomp.org> + + * README: Move design notes to NOTES. Add URLs for home, releases, + bugs, git and mailinglist now on sourceware. + * NOTES: Add notes from README. + * CONTRIBUTING: Change fedorahosted.org references to new + sourceware.org locations. + * configure.ac (AC_INIT): Add package URL http://elfutils.org/ + change bug-report to https://sourceware.org/bugzilla/ + (AC_COPYRIGHT): Set to the elfutils developers. + 2016-11-23 Mark Wielaard <mjw@redhat.com> * configure.ac: Add test for bad fts.h. Add -DBAD_FTS=1 to CFLAGS diff --git a/NOTES b/NOTES index 4f06b8d2df26cd2dd7282183adc24c112530d75b..2a5c23bf6623f3d3cc96d52a1ff3142ccdbd92d6 100644 --- a/NOTES +++ b/NOTES @@ -1,3 +1,25 @@ +Fundamental design decision: + +- the sizes of external and internal types are assumed to be the same. + This leaves byte ordering aside. While assuming this the code can be + greatly simplified and speed increases. Since no change violating this + assumption is in sight this is believed to be a worthwhile optimization. + +- the ABI of the backend modules is not guaranteed. Really, no guarantee + whatsoever. We are enforcing this in the code. The modules and their + users must match. No third-party EBL module are supported or allowed. + The only reason there are separate modules is to not have the code for + all architectures in all the binaries. + +- although the public libraries (libasm, libdw) have a stable API and are + backwards ABI compatible they, and the elfutils tools, do depend on each + others internals, and on internals of libelf to provide their interfaces. + So they should always be upgraded in lockstep when packaging the tools + and libraries separately. For one example of how to do that, see the + config/elfutils.spec. + +Some notes: + - old GNU ld's behavior wrt DSOs seems to be severely broken. y.o reference foo() diff --git a/README b/README index 35646766c005c718ef427ae130dc6f94da19329b..9e55d75a50ff0c3bef0b82b448f1f8bef63f9d6f 100644 --- a/README +++ b/README @@ -1,19 +1,22 @@ -Fundamental design decision: - -- the sizes of external and internal types are assumed to be the same. - This leaves byte ordering aside. While assuming this the code can be - greatly simplified and speed increases. Since no change violating this - assumption is in sight this is believed to be a worthwhile optimization. - -- the ABI of the backend modules is not guaranteed. Really, no guarantee - whatsoever. We are enforcing this in the code. The modules and their - users must match. No third-party EBL module are supported or allowed. - The only reason there are separate modules is to not have the code for - all architectures in all the binaries. - -- although the public libraries (libasm, libdw) have a stable API and are - backwards ABI compatible they, and the elfutils tools, do depend on each - others internals, and on internals of libelf to provide their interfaces. - So they should always be upgraded in lockstep when packaging the tools - and libraries separately. For one example of how to do that, see the - config/elfutils.spec. +The elfutils project provides libraries and tools for ELF files and DWARF data. + +The project home is http://elfutils.org/ + +Releases are published at ftp://sourceware.org/pub/elfutils/ +Which can also be found at https://sourceware.org/elfutils/ftp/ + +Please reports bugs at https://sourceware.org/bugzilla/ + +The current elfutils source code can be checked out with +git clone git://sourceware.org/git/elfutils.git + +The developer mailinglist to send patches to is +elfutils-devel@sourceware.org. +https://sourceware.org/ml/elfutils-devel/ + +To subscribe send an email to elfutils-devel-subscribe@sourceware.org +Or use the form at https://sourceware.org/lists.html#ml-requestor + +See the CONTRIBUTING file for how to propose patches to the code. + +See the NOTES files for some design decisions and notes. diff --git a/config/ChangeLog b/config/ChangeLog index a18fa847caf00de596cdc4079007e09e567b8785..10a7ce2df8de4a5216d7342a97ea13d8901f5952 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2016-12-24 Mark Wielaard <mark@klomp.org> + + * libdw.pc.in: Set URL to http://elfutils.org/ + * libelf.pc.in: Likewise. + 2016-11-02 Mark Wielaard <mjw@redhat.com> * eu.am: Check HAVE_IMPLICIT_FALLTHROUGH_WARNING. diff --git a/config/libdw.pc.in b/config/libdw.pc.in index b7dc002670f5abc2d1b112804c0aa80b81ee4b60..3fc283db0ffe315bf41963e43baaedc87876f10b 100644 --- a/config/libdw.pc.in +++ b/config/libdw.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@ Name: libdw Description: elfutils library for DWARF data and ELF file or process inspection Version: @VERSION@ -URL: https://fedorahosted.org/elfutils/ +URL: http://elfutils.org/ Libs: -L${libdir} -ldw Cflags: -I${includedir} diff --git a/config/libelf.pc.in b/config/libelf.pc.in index 1fc7e4cb0e62f382949b6c566b60952efe5d935b..48f3f0211fab7a0db15c96129b33b46c9e0b06e4 100644 --- a/config/libelf.pc.in +++ b/config/libelf.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@ Name: libelf Description: elfutils libelf library to read and write ELF files Version: @VERSION@ -URL: https://fedorahosted.org/elfutils/ +URL: http://elfutils.org/ Libs: -L${libdir} -lelf Cflags: -I${includedir} diff --git a/configure.ac b/configure.ac index f5351237cdac662b0c24b43441fe4b40c49b4dd0..55ec02e7eef852977fb727d54935e35704cfd0ea 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see <http://www.gnu.org/licenses/>. -AC_INIT([elfutils],[0.167],[https://bugzilla.redhat.com/],[elfutils]) +AC_INIT([elfutils],[0.167],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/]) # We want eu- as default program prefix if none was given by the user. # But if the user explicitly provided --program-prefix="" then pretend @@ -35,7 +35,7 @@ fi AC_CONFIG_AUX_DIR([config]) AC_CONFIG_FILES([config/Makefile]) -AC_COPYRIGHT([Copyright (C) 1996-2016 Red Hat, Inc.]) +AC_COPYRIGHT([Copyright (C) 1996-2016 The elfutils developers.]) AC_PREREQ(2.63) dnl Minimum Autoconf version required. dnl We use GNU make extensions; automake 1.10 defaults to -Wportability. diff --git a/lib/ChangeLog b/lib/ChangeLog index afb18b11738f990cb3499ca7eda78f9deb645272..1fe59067e39c5b1dcc0e6dc6e9f3c3847973b524 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,4 +1,10 @@ -2015-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> +2016-12-24 Mark Wielaard <mark@klomp.org> + + * version.c: New source file. + * Makefile.am (libeu_a_SOURCES): Add version.c + * system.h (print_version): New function definition. + +2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> * fixedsizehash.h (CONCAT): Use __CONCAT when available. * system.h: Include config.h and errno.h. diff --git a/lib/Makefile.am b/lib/Makefile.am index 7ca2bd417fb5b690bd49a9299d0c3449ea9ca381..1ad9ce8fadc993b4eac3a6f515f4b5ef48ff4076 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -35,7 +35,7 @@ noinst_LIBRARIES = libeu.a libeu_a_SOURCES = xstrdup.c xstrndup.c xmalloc.c next_prime.c \ crc32.c crc32_file.c md5.c sha1.c \ - color.c + color.c version.c noinst_HEADERS = fixedsizehash.h libeu.h system.h dynamicsizehash.h list.h \ md5.h sha1.h eu-config.h diff --git a/lib/system.h b/lib/system.h index e1c1c6986189d69be58a58ee6a14622a90546ccf..ccd99d63e5e3c79587c9c00e24a54c48a740aeef 100644 --- a/lib/system.h +++ b/lib/system.h @@ -152,6 +152,8 @@ pread_retry (int fd, void *buf, size_t len, off_t off) #define ARGP_PROGRAM_BUG_ADDRESS_DEF \ const char *const apba__ __asm ("argp_program_bug_address") +/* Defined in version.c. Common ARGP_PROGRAM_VERSION_HOOK_DEF. */ +void print_version (FILE *stream, struct argp_state *state); /* The demangler from libstdc++. */ extern char *__cxa_demangle (const char *mangled_name, char *output_buffer, diff --git a/lib/version.c b/lib/version.c new file mode 100644 index 0000000000000000000000000000000000000000..b8d70cbf413a523d3e411d8c7aae2df1db696b55 --- /dev/null +++ b/lib/version.c @@ -0,0 +1,47 @@ +/* Common argp_print_version_hook for all tools. + Copyright (C) 2016 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <argp.h> +#include <libintl.h> +#include <stdio.h> +#include "system.h" + +void +print_version (FILE *stream, struct argp_state *state) +{ + fprintf (stream, "%s (%s) %s\n", state->name, PACKAGE_NAME, PACKAGE_VERSION); + fprintf (stream, gettext ("\ +Copyright (C) %s The elfutils developers <%s>.\n\ +This is free software; see the source for copying conditions. There is NO\n\ +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ +"), "2016", PACKAGE_URL); +} diff --git a/po/ChangeLog b/po/ChangeLog index c3a2cb57e95c2b9e1cbb9f0658498ff78c08b77b..fb665983bc1a9f58ca9a15b450724d178eb75207 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,8 @@ +2016-12-24 Mark Wielaard <mark@klomp.org> + + * Makevars (COPYRIGHT_HOLDER): Set to the elfutils developers. + (MSGID_BUGS_ADDRESS): Set to http://sourceware.org/bugzilla/ + 2016-08-24 Mark Wielaard <mjw@redhat.com> * *.po: Regenerate. diff --git a/po/Makevars b/po/Makevars index 15d5d31878e5d5f0184eaf36e4c3144d2faadccd..0afcf4ea185f454455d26f61689458147a77509f 100644 --- a/po/Makevars +++ b/po/Makevars @@ -20,7 +20,7 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --flag=error:3:c-format \ # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. -COPYRIGHT_HOLDER = Red Hat, Inc. +COPYRIGHT_HOLDER = The elfutils developers # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: @@ -36,7 +36,7 @@ COPYRIGHT_HOLDER = Red Hat, Inc. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. -MSGID_BUGS_ADDRESS = http://bugzilla.redhat.com/ +MSGID_BUGS_ADDRESS = https://sourceware.org/bugzilla/ # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. diff --git a/src/ChangeLog b/src/ChangeLog index fe95ecb17c0284d63003870a038c64919abd5616..2a6d93ef8c0356b39f1bd25938ddc054030263e2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,24 @@ +2016-12-24 Mark Wielaard <mark@klomp.org> + + * Makefile.am (findtextrel_LDADD): Add $(libeu). + (addr2line_LDADD): Likewise. + (elfcmp_LDADD): Likewise. + * addr2line.c (print_version): Removed. + * ar.c (print_version): Likewise. + * elfcmp.c (print_version): Likewise. + * elfcompress.c (print_version): Likewise. + * elflint.c (print_version): Likewise. + * findtextrel.c (print_version): Likewise. + * nm.c (print_version): Likewise. + * objdump.c: Likewise. + * ranlib.c: Likewise. + * readelf.c: Likewise. + * size.c: Likewise. + * stack.c: Likewise. + * strings.c: Likewise. + * strip.c: Likewise. + * unstrip.c: Likewise. + 2016-11-17 Mark Wielaard <mjw@redhat.com> * readelf.c (options): Add optional arg SECTION for symbols. diff --git a/src/Makefile.am b/src/Makefile.am index 9bb47651125c2ea7bde2501183515d09f120a5e8..2b1c0dcbc824934a787df71a67d9ce01cccf0964 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -73,9 +73,9 @@ nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \ size_LDADD = $(libelf) $(libeu) $(argp_LDADD) strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl -findtextrel_LDADD = $(libdw) $(libelf) $(argp_LDADD) -addr2line_LDADD = $(libdw) $(libelf) $(argp_LDADD) $(demanglelib) -elfcmp_LDADD = $(libebl) $(libelf) $(argp_LDADD) -ldl +findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) +addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib) +elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) strings_LDADD = $(libelf) $(libeu) $(argp_LDADD) diff --git a/src/addr2line.c b/src/addr2line.c index bea24aeacf170434863c498e79c0879faa14dbdf..02220885aeeb3c1d4d3f149dd43cd2af723468d1 100644 --- a/src/addr2line.c +++ b/src/addr2line.c @@ -41,7 +41,6 @@ /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -208,20 +207,6 @@ main (int argc, char *argv[]) } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "addr2line (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Handle program arguments. */ static error_t parse_opt (int key, char *arg, struct argp_state *state) diff --git a/src/ar.c b/src/ar.c index f2160d354ae666ecb467f007f24fe1f7c25cfe47..f2f322b70ccb4770ccffc066bbe6e15187898894 100644 --- a/src/ar.c +++ b/src/ar.c @@ -46,7 +46,6 @@ /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Prototypes for local functions. */ @@ -277,20 +276,6 @@ MEMBER parameter required for 'a', 'b', and 'i' modifiers")); } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "ar (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Handle program arguments. */ static error_t parse_opt (int key, char *arg __attribute__ ((unused)), diff --git a/src/elfcmp.c b/src/elfcmp.c index 7b5d39ce951db457a4f5e114cf33d6079b5f6a5b..401ab3157fc600909c1354bd350ad482d5c79bfb 100644 --- a/src/elfcmp.c +++ b/src/elfcmp.c @@ -45,7 +45,6 @@ static int regioncompare (const void *p1, const void *p2); /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -664,20 +663,6 @@ cannot read note section [%zu] '%s' in '%s': %s"), } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "elfcmp (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Handle program arguments. */ static error_t parse_opt (int key, char *arg, diff --git a/src/elfcompress.c b/src/elfcompress.c index 82ab96559aeabbead449224861369f7157cb491c..9f6db1cc5626d2617180674873f24ef333e091c3 100644 --- a/src/elfcompress.c +++ b/src/elfcompress.c @@ -38,7 +38,6 @@ #include "system.h" /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -55,12 +54,6 @@ static const char *foutput = NULL; #define T_COMPRESS_GNU 3 /* zlib-gnu */ static int type = T_UNSET; -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "elfcompress (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); -} - struct section_pattern { char *pattern; diff --git a/src/elflint.c b/src/elflint.c index b304a3091ba80df77c5bc0ab8a6cb2deca6c0616..7d3f2271477437071c3dc7baa0e4195802026669 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -48,7 +48,6 @@ /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -228,20 +227,6 @@ parse_opt (int key, char *arg __attribute__ ((unused)), } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "elflint (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Process one file. */ static void process_file (int fd, Elf *elf, const char *prefix, const char *suffix, diff --git a/src/findtextrel.c b/src/findtextrel.c index e78d7b8a17ab1dd1fac4a5c621b35624f85f6718..dc41502bd0dda48c52762383274a4c8b6beb87d8 100644 --- a/src/findtextrel.c +++ b/src/findtextrel.c @@ -47,7 +47,6 @@ struct segments /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -154,20 +153,6 @@ main (int argc, char *argv[]) } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "findtextrel (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Handle program arguments. */ static error_t parse_opt (int key, char *arg, diff --git a/src/nm.c b/src/nm.c index 37e54bff4a793fd6d6b09796abcbd58004632e80..c54e96f01ea97aa639a1ffabe1df3fd75f9d800a 100644 --- a/src/nm.c +++ b/src/nm.c @@ -49,7 +49,6 @@ /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -254,20 +253,6 @@ main (int argc, char *argv[]) } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "nm (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Handle program arguments. */ static error_t parse_opt (int key, char *arg, diff --git a/src/objdump.c b/src/objdump.c index f84513ca22b22cb7eff5a6d3e737556fffd6bf66..fff4b818521fcc309a11a7ef89dea17ac0b69a0f 100644 --- a/src/objdump.c +++ b/src/objdump.c @@ -39,7 +39,6 @@ /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -169,20 +168,6 @@ main (int argc, char *argv[]) } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "objdump (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Handle program arguments. */ static error_t parse_opt (int key, char *arg, diff --git a/src/ranlib.c b/src/ranlib.c index 455de0d6078c2918e0a5ed95266207304bac3778..41a3bcf25caf921c2533130ff3ef8249fed89a96 100644 --- a/src/ranlib.c +++ b/src/ranlib.c @@ -47,7 +47,6 @@ static int handle_file (const char *fname); /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -115,20 +114,6 @@ main (int argc, char *argv[]) } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "ranlib (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - static int copy_content (Elf *elf, int newfd, off_t off, size_t n) { diff --git a/src/readelf.c b/src/readelf.c index a47b056a19a96422ed6dc61b89cd577429432202..d3a900884b7e65bcc37082383e2ee970ba193a18 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -57,7 +57,6 @@ /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -506,20 +505,6 @@ parse_opt (int key, char *arg, } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "readelf (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Create a file descriptor to read the data from the elf_input_section given a file descriptor to an ELF file. */ static int diff --git a/src/size.c b/src/size.c index b98674ca516995e9325de5096563b67861d9fa53..de0d791bbe50afa4f8fab0753c7ffb4dd2b410ab 100644 --- a/src/size.c +++ b/src/size.c @@ -39,7 +39,6 @@ /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -198,20 +197,6 @@ main (int argc, char *argv[]) } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "size (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Handle program arguments. */ static error_t parse_opt (int key, char *arg, diff --git a/src/stack.c b/src/stack.c index c277dfd03f775a53a6d4704b1525aa0adac23522..a5a7bebc38bfd78434b5a0f984ee60422fa88871 100644 --- a/src/stack.c +++ b/src/stack.c @@ -32,7 +32,6 @@ #include <system.h> /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -470,12 +469,6 @@ thread_callback (Dwfl_Thread *thread, void *thread_arg) return DWARF_CB_OK; } -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "stack (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); -} - static error_t parse_opt (int key, char *arg __attribute__ ((unused)), struct argp_state *state) diff --git a/src/strings.c b/src/strings.c index a4ffcbee986151c5db997c355e938d7fea1ed6d5..49aab8b0bd8bf430529247e9c88eb21083a65d55 100644 --- a/src/strings.c +++ b/src/strings.c @@ -54,7 +54,6 @@ static int read_elf (Elf *elf, int fd, const char *fname, off_t fdlen); /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -222,20 +221,6 @@ main (int argc, char *argv[]) } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "strings (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Handle program arguments. */ static error_t parse_opt (int key, char *arg, diff --git a/src/strip.c b/src/strip.c index 64ef84d37544418fab2ae4eaf3fa47d040f4ebdb..a791ca573dd6295c9b2e92771bf690b86708d5ba 100644 --- a/src/strip.c +++ b/src/strip.c @@ -48,7 +48,6 @@ typedef uint8_t GElf_Byte; /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -211,20 +210,6 @@ Only one input file allowed together with '-o' and '-f'")); } -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "strip (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, gettext ("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); -} - - /* Handle program arguments. */ static error_t parse_opt (int key, char *arg, struct argp_state *state) diff --git a/src/unstrip.c b/src/unstrip.c index cc3dcb26611ae611d7b36bde35af0375199a6c62..d838ae9f895238cd1f50e02701c86d1de26c061b 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -57,7 +57,6 @@ #endif /* Name and version of program. */ -static void print_version (FILE *stream, struct argp_state *state); ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ @@ -225,19 +224,6 @@ parse_opt (int key, char *arg, struct argp_state *state) } return 0; } - -/* Print the version information. */ -static void -print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) -{ - fprintf (stream, "unstrip (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf (stream, _("\ -Copyright (C) %s Red Hat, Inc.\n\ -This is free software; see the source for copying conditions. There is NO\n\ -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2012"); - fprintf (stream, gettext ("Written by %s.\n"), "Roland McGrath"); -} #define ELF_CHECK(call, msg) \ do \