diff options
author | Nick Clifton <nickc@redhat.com> | 2018-04-17 13:53:38 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-04-17 13:53:38 +0100 |
commit | e9301e762ab6d533f7110d6c9c1dbe8e68e875d7 (patch) | |
tree | 0b133fb3acaf736f204ecb924bb26e9aa6664037 /libiberty/argv.c | |
parent | bdd7c8fc34dc65806ec14df84c76e17690a16f50 (diff) | |
download | gdb-e9301e762ab6d533f7110d6c9c1dbe8e68e875d7.zip gdb-e9301e762ab6d533f7110d6c9c1dbe8e68e875d7.tar.gz gdb-e9301e762ab6d533f7110d6c9c1dbe8e68e875d7.tar.bz2 |
Resync libiberty sources with master version in GCC repository.
2018-04-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR lto/81968
* simple-object.c (handle_lto_debug_sections): Keep .comment
section.
2018-03-02 David Malcolm <dmalcolm@redhat.com>
* cp-demangle.c: Update URL for g++ V3 ABI.
2018-01-20 Eli Zaretskii <eliz@gnu.org>
* simple-object-xcoff.c (simple_object_xcoff_find_sections): Use
ulong_type to avoid warning about 32-bit shift.
2018-01-11 Richard Biener <rguenther@suse.de>
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR lto/81968
* simple-object-common.h (struct simple_object_functions):
Change copy_lto_debug_sections callback signature.
* simple-object-elf.c (SHN_HIRESERVE, SHT_SYMTAB_SHNDX,
SHF_INFO_LINK): Add defines.
(simple_object_elf_copy_lto_debug_sections): Instead of
leaving not to be copied sections empty unnamed SHT_NULL
remove them from the target section headers and adjust section
reference everywhere. Handle SHN_XINDEX in the symbol table
processing properly.
* simple-object.c (handle_lto_debug_sections): Change
interface to return a modified string and handle renaming
of relocation sections.
2018-01-10 Daniel van Gerpen <daniel@vangerpen.de>
* argv.c (expandargv): Correct check for dynamically
allocated argv.
Diffstat (limited to 'libiberty/argv.c')
-rw-r--r-- | libiberty/argv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libiberty/argv.c b/libiberty/argv.c index c6a79d2..4f66c89 100644 --- a/libiberty/argv.c +++ b/libiberty/argv.c @@ -367,8 +367,8 @@ expandargv (int *argcp, char ***argvp) { /* The argument we are currently processing. */ int i = 0; - /* Non-zero if ***argvp has been dynamically allocated. */ - int argv_dynamic = 0; + /* To check if ***argvp has been dynamically allocated. */ + char ** const original_argv = *argvp; /* Limit the number of response files that we parse in order to prevent infinite recursion. */ unsigned int iteration_limit = 2000; @@ -449,7 +449,7 @@ expandargv (int *argcp, char ***argvp) /* Parse the string. */ file_argv = buildargv (buffer); /* If *ARGVP is not already dynamically allocated, copy it. */ - if (!argv_dynamic) + if (*argvp == original_argv) *argvp = dupargv (*argvp); /* Count the number of arguments. */ file_argc = 0; |