diff options
author | Ulrich Drepper <drepper@myware66.akkadia.org> | 2009-01-17 11:47:10 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@myware66.akkadia.org> | 2009-01-17 11:47:10 -0800 |
commit | fdc93e12a77866cafd1aae4463d89cef2c01d9b1 (patch) | |
tree | 96164f699e204dbc733f3810f7e534fa7265bc8e /src | |
parent | 3a52c7a528e41cc28e69e68ef817f0b2d7f130e5 (diff) | |
download | elfutils-fdc93e12a77866cafd1aae4463d89cef2c01d9b1.tar.gz |
Move argp_program_version_hook and argp_program_bug_address variables
in all programs into the .rodata section.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 18 | ||||
-rw-r--r-- | src/addr2line.c | 6 | ||||
-rw-r--r-- | src/ar.c | 5 | ||||
-rw-r--r-- | src/elfcmp.c | 5 | ||||
-rw-r--r-- | src/elflint.c | 5 | ||||
-rw-r--r-- | src/findtextrel.c | 6 | ||||
-rw-r--r-- | src/ld.c | 4 | ||||
-rw-r--r-- | src/nm.c | 4 | ||||
-rw-r--r-- | src/objdump.c | 4 | ||||
-rw-r--r-- | src/ranlib.c | 4 | ||||
-rw-r--r-- | src/readelf.c | 4 | ||||
-rw-r--r-- | src/size.c | 4 | ||||
-rw-r--r-- | src/strings.c | 4 | ||||
-rw-r--r-- | src/strip.c | 4 | ||||
-rw-r--r-- | src/unstrip.c | 5 |
15 files changed, 52 insertions, 30 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4a9b6316..97fd4495 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2009-01-17 Ulrich Drepper <drepper@redhat.com> + + * addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and + ARGP_PROGRAM_BUG_ADDRESS_DEF. + * ar.c: Likewise. + * elfcmp.c: Likewise. + * elflint.c: Likewise. + * findtextrel.c: Likewise. + * ld.c: Likewise. + * nm.c: Likewise. + * objdump.c: Likewise. + * ranlib.c: Likewise. + * readelf.c: Likewise. + * size.c: Likewise. + * strings.c: Likewise. + * strip.c: Likewise. + * unstrip.c: Likewise. + 2009-01-16 Ulrich Drepper <drepper@redhat.com> * elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry diff --git a/src/addr2line.c b/src/addr2line.c index 7141e269..5a7b0456 100644 --- a/src/addr2line.c +++ b/src/addr2line.c @@ -46,13 +46,15 @@ #include <string.h> #include <unistd.h> +#include <system.h> + /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Values for the parameters which have no short form. */ @@ -55,7 +55,8 @@ /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; + /* Prototypes for local functions. */ static int do_oper_extract (int oper, const char *arfname, char **argv, int argc, long int instance); @@ -66,7 +67,7 @@ static int do_oper_insert (int oper, const char *arfname, char **argv, /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Definitions of arguments for argp functions. */ diff --git a/src/elfcmp.c b/src/elfcmp.c index 8903efb1..a1596365 100644 --- a/src/elfcmp.c +++ b/src/elfcmp.c @@ -41,6 +41,7 @@ #include <string.h> #include <unistd.h> +#include <system.h> #include "../libelf/elf-knowledge.h" #include "../libebl/libeblP.h" @@ -53,10 +54,10 @@ static int regioncompare (const void *p1, const void *p2); /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Values for the parameters which have no short form. */ #define OPT_GAPS 0x100 diff --git a/src/elflint.c b/src/elflint.c index 35368a5e..1c508c47 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -56,10 +56,10 @@ /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; #define ARGP_strict 300 #define ARGP_gnuld 301 @@ -67,7 +67,6 @@ const char *argp_program_bug_address = PACKAGE_BUGREPORT; /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = { - { "strict", ARGP_strict, NULL, 0, N_("Be extremely strict, flag level 2 features."), 0 }, { "quiet", 'q', NULL, 0, N_("Do not print anything if successful"), 0 }, diff --git a/src/findtextrel.c b/src/findtextrel.c index 2fd99c96..9d10982f 100644 --- a/src/findtextrel.c +++ b/src/findtextrel.c @@ -44,6 +44,8 @@ #include <string.h> #include <unistd.h> +#include <system.h> + struct segments { @@ -54,10 +56,10 @@ struct segments /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Values for the parameters which have no short form. */ #define OPT_DEBUGINFO 0x100 @@ -48,10 +48,10 @@ /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Values for the various options. */ @@ -58,10 +58,10 @@ /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Values for the parameters which have no short form. */ diff --git a/src/objdump.c b/src/objdump.c index 55d3ae2e..7f639410 100644 --- a/src/objdump.c +++ b/src/objdump.c @@ -49,10 +49,10 @@ /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Definitions of arguments for argp functions. */ diff --git a/src/ranlib.c b/src/ranlib.c index f456b997..e92dc89b 100644 --- a/src/ranlib.c +++ b/src/ranlib.c @@ -58,10 +58,10 @@ static int handle_file (const char *fname); /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Definitions of arguments for argp functions. */ diff --git a/src/readelf.c b/src/readelf.c index 5d74cb56..a3223eb4 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -61,10 +61,10 @@ /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = @@ -50,10 +50,10 @@ /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Values for the parameters which have no short form. */ diff --git a/src/strings.c b/src/strings.c index aebf07bd..b69f2ad2 100644 --- a/src/strings.c +++ b/src/strings.c @@ -59,10 +59,10 @@ static int read_elf (Elf *elf, int fd, const char *fname, off64_t fdlen); /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = diff --git a/src/strip.c b/src/strip.c index 3ca047af..1958bb51 100644 --- a/src/strip.c +++ b/src/strip.c @@ -55,10 +55,10 @@ /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Values for the parameters which have no short form. */ diff --git a/src/unstrip.c b/src/unstrip.c index 4a6fd197..97b73c6f 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -64,11 +64,10 @@ /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); -void (*argp_program_version_hook) (FILE *, struct argp_state *) - = print_version; +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; /* Bug report address. */ -const char *argp_program_bug_address = PACKAGE_BUGREPORT; +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = |