Jan Beulich [Wed, 7 Jan 2015 08:39:27 +0000 (09:39 +0100)]
arm: fix extension feature disabling
Using e.g.
.arch_extension simd
.arch_extension nocrypto
so far results in SIMD support getting disabled, which I can't see being
the purpose of the "no"-prefixed variants of architecture extension
specifications.
Of course it is questionable whether the current, counter intuitive
behavior needs to be retained, and the new behavior perhaps be made work
through e.g. a newly recognized "no-" prefix.
gas/
2015-01-07 Jan Beulich <jbeulich@suse.com>
* gas/config/tc-arm.c (struct arm_option_extension_value_table):
Split field "value" into fields "merge_value" and "clear_value".
(arm_extensions): Adjust initializer accordingly.
Joel Brobecker [Wed, 7 Jan 2015 03:34:29 +0000 (07:34 +0400)]
[python,guile] Add comment beside conditions testing empty arrays.
gdb/ChangeLog:
* guile/scm-type.c (tyscm_array_1): Add comment.
* python/py-type.c (typy_array_1): Add comment.
H.J. Lu [Wed, 7 Jan 2015 00:46:36 +0000 (16:46 -0800)]
Skip unknown relocation
PR binutils/17512
* elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
GDB Administrator [Wed, 7 Jan 2015 00:00:14 +0000 (00:00 +0000)]
Automatic date update in version.in
H.J. Lu [Thu, 18 Dec 2014 19:09:28 +0000 (11:09 -0800)]
Handle stack split for x32
X32 uses cmp %fs:NN,%esp, lea NN(%rsp),%r10d, lea NN(%rsp),%r11d,
instead of cmp %fs:NN,%rsp, lea NN(%rsp),%r10, lea NN(%rsp),%r11.
This patch handles it.
PR gold/17729
* configure.ac (DEFAULT_TARGET_X86_64): Don't set for x32.
(DEFAULT_TARGET_X32): Set for x32.
* x86_64.cc (cmp_insn_32): New.
(lea_r10_insn_32): Likewise.
(lea_r11_insn_32): Likewise.
(cmp_insn_64): Likewise.
(lea_r10_insn_64): Likewise.
(lea_r11_insn_64): Likewise.
(Target_x86_64<size>::do_calls_non_split): Handle x32.
* testsuite/Makefile.am (check_SCRIPTS): Add split_x32.sh.
(check_DATA): Add split_x32 files.
(split_x32_[1234n].o): New targets.
(split_x32_[124]): New targets.
(split_x32_[1234r].stdout): New targets.
* testsuite/split_x32.sh: New file.
* testsuite/split_x32_1.s: Likewise.
* testsuite/split_x32_2.s: Likewise.
* testsuite/split_x32_3.s: Likewise.
* testsuite/split_x32_4.s: Likewise.
* testsuite/split_x32_n.s: Likewise.
* configure: Regenerated.
* testsuite/Makefile.in: Likewise.
Nick Clifton [Tue, 6 Jan 2015 22:02:55 +0000 (22:02 +0000)]
Another fix for an objdump crash when parsing a corrupt binary.
PR binutils/17512
* mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
string table.
H.J. Lu [Tue, 6 Jan 2015 20:58:54 +0000 (12:58 -0800)]
Handle Initial-Exec to Local-Exec for x32
PR gold/17809
* x86_64.cc (Target_x86_64<size>::Relocate::tls_ie_to_le): Handle
x32.
Nick Clifton [Tue, 6 Jan 2015 17:54:02 +0000 (17:54 +0000)]
Fix memory access violations for objdump triggered by fuzzed binaries.
PR binutils/17512
* reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
(bfd_perform_relocation): Include the size of the reloc in the
test for an out of range relocation.
(bfd_generic_get_relocated_section_contents): Remove reloc range
test.
Alan Modra [Tue, 6 Jan 2015 16:46:40 +0000 (16:46 +0000)]
Fixes a buffer overflow when compiling assembler for the MinGW targets.
PR binutils/17754
* internal.h (internal_auxent): Increase size of x_fname field to
20 to allow for PE format's longer file names.
Nick Clifton [Tue, 6 Jan 2015 16:06:45 +0000 (16:06 +0000)]
Fixes for memory access violations in the coffdump program.
PR binutils/17512
* coffdump.c (dump_coff_section): Check for a symbol being
available before printing its name.
(main): Check the return value from coff_grok.
* coffgrok.c: Reformat and tidy.
Add range checks to most functions.
(coff_grok): Return NULL if the input bfd is not in a COFF
format.
* coffgrok.h: Reformat and tidy.
(struct coff_section): Change the nrelocs field to unsigned.
* srconv.c (main): Check the return value from coff_grok.
* coff-i860.c (CALC_ADDEND): Always set an addend value.
* tekhex.c (getvalue): Add an end pointer parameter. Use it to
avoid reading off the end of the buffer.
(getsym): Likewise.
(first_phase): Likewise.
(pass_over): Pass an end pointer to the invoked function.
Joel Brobecker [Tue, 6 Jan 2015 14:37:53 +0000 (18:37 +0400)]
gdb/guile: Do not error when trying to create empty array.
This fixes a similar error as in the Python support code where
trying to create an empty array.
In guile/scm-type.c::tyscm_array_1, the funtion raises an exception
if N2 < N1:
if (n2 < n1)
{
gdbscm_out_of_range_error (func_name, SCM_ARG3,
But it should be doing so if N2 == N1 - 1, since that would simply
be an empty array, not an array with a negative length.
gdb/ChangeLog:
* guile/scm-type.c (tyscm_array_1): Do not raise out-of-range
error if N2 is equal to N1 - 1.
Joel Brobecker [Tue, 6 Jan 2015 14:30:53 +0000 (18:30 +0400)]
gdb/python: exception trying to create empty array
The following python command fails:
(gdb) python print gdb.lookup_type('char').array(1, 0)
Traceback (most recent call last):
File "<string>", line 1, in <module>
ValueError: Array length must not be negative
Error while executing Python code.
The above is trying to create an empty array, which is fairly command
in Ada.
gdb/ChangeLog:
* python/py-type.c (typy_array_1): Do not raise negative-length
exception if N2 is equal to N1 - 1.
gdb/testsuite/ChangeLog:
* gdb.python/py-type.exp: Add a couple test about empty
array creation, and negative-length array creation.
H.J. Lu [Tue, 6 Jan 2015 01:43:34 +0000 (17:43 -0800)]
Return NULL on corrupt input
PR binutils/17512
* elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
input.
* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
GDB Administrator [Tue, 6 Jan 2015 00:00:11 +0000 (00:00 +0000)]
Automatic date update in version.in
Nick Clifton [Mon, 5 Jan 2015 23:13:50 +0000 (23:13 +0000)]
More fixes for invalid memory accesses triggered by fuzzed binaries.
PR binutils/17512
* nm.c (print_symbol): Add 'is_synthetic' parameter. Use it to
help initialize the info.elfinfo field.
(print_size_symbols): Add 'synth_count' parameter. Use it to set
the is_synthetic parameter when calling print_symbol.
(print_symbols): Likewise.
(display_rel_file): Pass synth_count to printing function.
(display_archive): Break loop if the last archive displayed
matches the current archive.
* size.c (display_archive): Likewise.
* archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
is at least big enough for the header to be read.
* elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
* mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
(bfd_mach_o_read_command): Prevetn duplicate error messages about
unrecognized commands.
* syms.c (_bfd_stab_section_find_nearest_line): Add range checks
when indexing into the string table.
Nick Clifton [Mon, 5 Jan 2015 13:54:22 +0000 (13:54 +0000)]
More fixes for invalid memory accesses triggered by fuzzed binaries.
PR binutils/17531
* dwarf.c (alloc_num_debug_info_entries): New variable.
(process_debug_info): Set it. Use it to avoid displaying
attributes for which there is no info.
(display_debug_abbrev): Check that the debug_info_entry index is
valid before using it.
(display_loc_list_dwo): Likewise.
(process_cu_tu_index): Add range check for an overlarge dw_sect
value.
(free_debug_memory): Reset alloc_num_debug_info_entries.
* readelf.c (slurp_ia64_unwind_table): Warn if the reloc could not
be indentified.
(dynamic_section_mips_val): Warn if the timestamp is invalid.
(print_mips_got_entry): Add a data_end parameter. Warn if a read
would go beyond the end of the data, and return an error value.
(process_mips_specific): Do not read options from beyond the end
of the section.
Correct code to display optional data at the end of an option.
Warn if there are too many GOT symbols.
Update calls to print_mips_got_entry, and handle error returns.
Daniel Klauer [Mon, 5 Jan 2015 09:41:48 +0000 (09:41 +0000)]
Corrects the description of the --kill-at option of dlltool.
PR binutils/17489
* doc/binutils.texi (dlltool): Correct description of --kill-at
option.
GDB Administrator [Mon, 5 Jan 2015 00:00:12 +0000 (00:00 +0000)]
Automatic date update in version.in
GDB Administrator [Sun, 4 Jan 2015 00:00:14 +0000 (00:00 +0000)]
Automatic date update in version.in
Andrew Pinski [Sat, 3 Jan 2015 22:54:45 +0000 (14:54 -0800)]
[GCC bug #63539]: libgo does not use the newly built objcopy when doing a combined build
2015-01-03 Andrew Pinski <apinski@cavium.com>
* Makefile.def (flags_to_pass): Pass OBJCOPY_FOR_TARGET also.
* Makefile.tpl (HOST_EXPORTS): Add OBJCOPY_FOR_TARGET.
(BASE_TARGET_EXPORTS): Add OBJCOPY.
(OBJCOPY_FOR_TARGET): New variable.
(EXTRA_TARGET_FLAGS): Add OBJCOPY.
* Makefile.in: Regenerate.
* configure.ac: Check for already installed target objcopy.
Also GCC_TARGET_TOOL on objcopy.
* configure: Regenerate.
Doug Evans [Sat, 3 Jan 2015 20:35:41 +0000 (12:35 -0800)]
fix spelling of anon-ns2.cc in earlier entry, and whitespace in same entry
Doug Evans [Sat, 3 Jan 2015 20:01:29 +0000 (12:01 -0800)]
c-exp.y: misc cleanup, no code changes
gdb/ChangeLog:
* c-exp.y: Whitespace cleanup.
(classify_inner_name): Remove extra ;.
Doug Evans [Sat, 3 Jan 2015 06:00:57 +0000 (22:00 -0800)]
gdb.cp/nsalias.exp: Fix output of external/declaration flags.
gdb/testsuite/ChangeLog:
* gdb.cp/nsalias.exp: Fix output of external/declaration flags.
GDB Administrator [Sat, 3 Jan 2015 00:00:11 +0000 (00:00 +0000)]
Automatic date update in version.in
Maciej W. Rozycki [Fri, 2 Jan 2015 23:36:05 +0000 (23:36 +0000)]
MIPS: Make the extracted stack offset signed in the prologue scanner
Make the extracted stack offset signed in the standard MIPS prologue
scanner, to simplify handling and make sure register offsets are correct
in all cases, especially where $fp equals the virtual frame pointer (old
GCC frames) and therefore offsets to save slots are negative.
* mips-tdep.c (mips32_scan_prologue): Make the extracted stack
offset signed.
Doug Evans [Fri, 2 Jan 2015 20:59:44 +0000 (12:59 -0800)]
gdb.dwarf2/dw4-sig-types.exp: Also pass -fdebug-types-section to gcc.
gdb/testsuite/ChangeLog:
* gdb.dwarf2/dw4-sig-types.exp: Also pass -fdebug-types-section to gcc.
Doug Evans [Fri, 2 Jan 2015 19:49:14 +0000 (11:49 -0800)]
dwarf2read.c (setup_type_unit_groups): Remove outdated comment.
gdb/ChangeLog:
* dwarf2read.c (setup_type_unit_groups): Remove outdated comment.
Doug Evans [Fri, 2 Jan 2015 19:02:31 +0000 (11:02 -0800)]
symtab.h (struct symbol): Fix typo in comment.
gdb/ChangeLog:
* symtab.h (struct symbol): Fix typo in comment.
Alan Modra [Fri, 2 Jan 2015 11:53:31 +0000 (22:23 +1030)]
Regenerate Makeile.in file for copyright update
Hans-Peter Nilsson [Fri, 2 Jan 2015 09:40:57 +0000 (10:40 +0100)]
config.sub, config.guess: Update from upstream, to 2015-01-01 version.
GDB Administrator [Fri, 2 Jan 2015 00:00:16 +0000 (00:00 +0000)]
Automatic date update in version.in
Alan Modra [Thu, 1 Jan 2015 22:21:43 +0000 (08:51 +1030)]
Correct printed year in copyright notices for gold.
Alan Modra [Thu, 1 Jan 2015 14:38:15 +0000 (01:08 +1030)]
Correct printed year in copyright notices
Alan Modra [Thu, 1 Jan 2015 14:15:26 +0000 (00:45 +1030)]
ChangeLog rotatation and copyright year update
Joel Brobecker [Thu, 1 Jan 2015 09:32:14 +0000 (13:32 +0400)]
Update year range in copyright notice of all files owned by the GDB project.
gdb/ChangeLog:
Update year range in copyright notice of all files.
Joel Brobecker [Thu, 1 Jan 2015 09:24:41 +0000 (13:24 +0400)]
Update copyright year printed by gdb, gdbserver and gdbreplay.
gdb/ChangeLog:
* top.c (print_gdb_version): Update copyright year to 2015.
gdbserver/ChangeLog:
* gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
* server.c (gdbserver_version): Likewise.
Joel Brobecker [Thu, 1 Jan 2015 09:21:14 +0000 (13:21 +0400)]
Yearly gdb/ChangeLog rotation.
This patch renames gdb/'s ChangeLog to ChangeLog-2014 and creates
a new one for 2015. config/djgpp/fnchange.lst is updated accordingly.
gdb/ChangeLog:
* config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2014.
GDB Administrator [Thu, 1 Jan 2015 00:00:10 +0000 (00:00 +0000)]
Automatic date update in version.in
Joel Brobecker [Tue, 30 Dec 2014 07:36:53 +0000 (11:36 +0400)]
Remove "add-shared-symbol-files", "dll-symbols" and "assf" commands doc.
This patch removes documentation from some commands whose support has
been recently removed.
gdb/ChangeLog:
* NEWS: Document removal of "dll-symbols", "add-shared-symbol-files"
and "assf" commands.
gdb/doc/ChangeLog:
* gdb.texinfo (Files): Remove documentation of the
"add-shared-symbol-files" and "assf" commands.
(Cygwin Native): Remove documentation of the "dll-symbols"
command.
H.J. Lu [Wed, 31 Dec 2014 03:09:11 +0000 (19:09 -0800)]
Assign file position for .strtab only if needed
bfd/
PR ld/17773
* elflink.c (bfd_elf_final_link): Assign the file position for
the symbol string table only there are symbols to be emitted.
ld/testsuite/
PR ld/17773
* ld-elf/binutils.exp (binutils_test): Add an optional
readelf_options. Replace -l with $readelf_options. Add a
gap test.
* ld/testsuite/ld-elf/gap.s: New file.
GDB Administrator [Wed, 31 Dec 2014 00:00:24 +0000 (00:00 +0000)]
Automatic date update in version.in
Eli Zaretskii [Tue, 30 Dec 2014 19:14:25 +0000 (21:14 +0200)]
Fix executable indicator in file name completion on Windows.
* complete.c (stat_char) [_WIN32]: Don't use 'access' and X_OK on
Windows, they don't work. Instead, look at the file-name
extension to determine whether the file is executable.
Joel Brobecker [Tue, 30 Dec 2014 07:30:01 +0000 (11:30 +0400)]
Remove "dll-symbols", "add-shared-symbol-files" and assf" commands.
This patch removes a set of commands that have been deprecated for
a while, and which we agreed to remove after the GDB 7.8 release.
gdb/ChangeLog:
* windows-nat.c (safe_symbol_file_add_stub)
(safe_symbol_file_add_cleanup, safe_symbol_file_add)
(dll_symbol_command): Delete.
(_initialize_windows_nat): Delete local variable "c".
Remove "dll-symbols", "add-shared-symbol-files" and assf"
commands.
Tested by rebuilding GDB on x86-windows.
GDB Administrator [Tue, 30 Dec 2014 00:00:13 +0000 (00:00 +0000)]
Automatic date update in version.in
Sergio Durigan Junior [Mon, 29 Dec 2014 19:22:20 +0000 (14:22 -0500)]
Sanitize input_interrupt output
Hi,
This patch is a follow-up of the following discussions:
<https://sourceware.org/ml/gdb-patches/2014-12/msg00421.html>
<https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01293.html>
input_interrupt is currently emiting non-printable characters, which
is confusing the dg-extract-results.sh script. This is obviously not
a good thing, and, by following Pedro's advices here:
<https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01320.html>
I adapted the function to print "client connection closed" when it
receives a NUL character, or use the "isprint" function to decide how
to print the received char. I tested it by running the testcases that
were printing the non-printable chars before:
gdb.base/gdb-sigterm.exp
gdb.threads/non-ldr-exc-1.exp
gdb.threads/non-ldr-exc-2.exp
gdb.threads/non-ldr-exc-3.exp
gdb.threads/non-ldr-exc-4.exp
gdb.threads/thread-execl.exp
and confirming that they print the right message. I tried a bit to
come up with a testcase for this, but failed, and since I did not want
to spend too much time on it, I'm sending the patch anyway.
Comments are welcome, as usual.
gdb/gdbserver/ChangeLog:
2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
* remote-utils.c: Include ctype.h.
(input_interrupt): Explicitly handle the case when the char
received is the NUL byte. Improve the printing of non-ASCII
characters.
Jiong Wang [Mon, 29 Dec 2014 14:56:36 +0000 (14:56 +0000)]
[PATCH] Remove cast in Tag_ABI_VFP_args switch case stmts
2014-12-29 Thomas Preud'homme <thomas.preudhomme@arm.com>
gdb/
* arm-tdep.c (arm_gdbarch_init): Remove casts in Tag_ABI_VFP_args
switch case statements.
Yao Qi [Mon, 29 Dec 2014 03:56:51 +0000 (11:56 +0800)]
Clean up gdb.trace/entry-values.exp
This patch is to clean up gdb.trace/entry-values.exp as a preparation
of the next patch. It updates the comments to reflect the code.
One DIE generated in dwarf assembler is
GNU_call_site {
{low_pc "$bar_start + $bar_call_foo" addr}
{abstract_origin :$foo_label}
the DW_AT_low_pc attribute is the return address after the call, so I
rename variable bar_call_foo to returned_from_foo.
gdb/testsuite:
2014-12-29 Yao Qi <yao@codesourcery.com>
* gdb.trace/entry-values.exp: Update comments. Rename variable
bar_call_foo to returned_from_foo.
Anthony Green [Mon, 29 Dec 2014 05:42:55 +0000 (00:42 -0500)]
Add moxiebox target support
GDB Administrator [Mon, 29 Dec 2014 00:00:14 +0000 (00:00 +0000)]
Automatic date update in version.in
Alan Modra [Sun, 28 Dec 2014 04:58:19 +0000 (15:28 +1030)]
Misplaced parenthesis calculates two too few bytes for string
Factor out strlen to give better code and less likelihood of a repeat
of this problem.
PR 17766
* pei-x86_64.c (pex64_bfd_print_pdata_section): Correct string
length. Use memcpy rather than strcpy.
Joel Brobecker [Sun, 28 Dec 2014 03:44:49 +0000 (07:44 +0400)]
Fix small spelling mistake in gdb/ChangeLog.
GDB Administrator [Sun, 28 Dec 2014 00:00:09 +0000 (00:00 +0000)]
Automatic date update in version.in
Anthony Green [Sat, 27 Dec 2014 23:37:58 +0000 (18:37 -0500)]
Update for moxie ISA changes
Anthony Green [Sat, 27 Dec 2014 23:19:49 +0000 (18:19 -0500)]
Update sto/ldo implementations with 16 bit offsets
Anthony Green [Sat, 27 Dec 2014 15:57:04 +0000 (10:57 -0500)]
Limit moxie sto/ldo offsets to 16 bits
GDB Administrator [Sat, 27 Dec 2014 00:00:12 +0000 (00:00 +0000)]
Automatic date update in version.in
Alan Modra [Fri, 26 Dec 2014 11:40:52 +0000 (22:10 +1030)]
Update two sh64 ld test's expected output
At some stage someone fixed a bug in ld -r output, preserving
SHF_INFO_LINK from input objects. These two tests expected the old
wrong output.
* ld-sh/sh64/crangerel1.rd: Update.
* ld-sh/sh64/crangerel2.rd: Update.
Alan Modra [Fri, 26 Dec 2014 07:56:38 +0000 (18:26 +1030)]
Delete unnecessary code copying SHF_SH5_ISA32 flag
Since 2006, commit
d270463e9, _bfd_elf_copy_private_section_data has
copied over SHF_MASKOS and SHF_MASKPROC flags. That makes the buggy
code in sh_elf64_copy_private_data_internal redundant.
bfd/
PR 17755
* elf64-sh64.c (sh_elf64_copy_private_data_internal): Delete code
copying SHF_SH5_ISA32.
binutils/testsuite/
* binutils-all/strip-11.d: New test.
* binutils-all/objcopy.exp: Run it.
GDB Administrator [Fri, 26 Dec 2014 00:00:09 +0000 (00:00 +0000)]
Automatic date update in version.in
Anthony Green [Thu, 25 Dec 2014 13:26:57 +0000 (08:26 -0500)]
Whitespace cleanup
Anthony Green [Thu, 25 Dec 2014 13:26:57 +0000 (08:26 -0500)]
Whitespace cleanup
Alan Modra [Thu, 25 Dec 2014 11:45:14 +0000 (22:15 +1030)]
ARM: Add support for value 3 of Tag_ABI_VFP_args attribute
Missing from
5c294fee
elfcpp/
* arm.h: Add enums for Tag_ABI_FP_number_model and Tag_ABI_VFP_args.
gold/
* arm.cc (Target_arm::do_adjust_elf_header): Provide namespace on
new enums.
(Target_arm::merge_object_attributes, ): Likewise.
Yaakov Selkowitz [Thu, 25 Dec 2014 10:55:38 +0000 (21:25 +1030)]
Don't pass unadorned zeros to varargs functions
PR gas/17753
* config/tc-mep.c (md_begin): Specify types of vararg literals.
Terry Guo [Thu, 25 Dec 2014 01:50:48 +0000 (09:50 +0800)]
ARM: Add support for value 3 of Tag_ABI_VFP_args attribute
*** bfd/ChangeLog ***
2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
Tag_ABI_VFP_args value and replace hardcoded values by enum
values.
(elf32_arm_post_process_headers): Set e_flags in ELF header
as hard float only when Tag_ABI_VFP_args is 1, using new enum
value AEABI_VFP_args_vfp to check that.
*** binutils/ChangeLog ***
2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
* readelf.c (arm_attr_tag_ABI_VFP_args): Add "compatible".
*** gdb/ChangeLog ***
2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
* arm-tdep.c (arm_gdbarch_init): Explicitely handle value 3 of
Tag_ABI_VFP_args. Also replace hardcoded values by enum values
in the switch handling the different values of Tag_ABI_VFP_args.
*** gold/ChangeLog ***
2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
* arm.cc (Target_arm::do_adjust_elf_header): Set e_flags in ELF
header as hard float only when Tag_ABI_VFP_args is 1, using new
enum value AEABI_VFP_args_vfp to check that.
(Target_arm::merge_object_attributes): Handle new Tag_ABI_VFP_args
value and replace hardcoded values by enum values.
*** include/elf/ChangeLog ***
2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
* arm.h: New AEABI_FP_number_model_* and AEABI_VFP_args_* enum
values.
*** ld/testsuite/ChangeLog ***
2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
* ld-arm/attr-merge-2a.s: Add Tag_ABI_VFP_args.
* ld-arm/attr-merge-2b.s: Likewise.
* ld-arm/attr-merge-2.attr: Likewise.
* ld-arm/attr-merge-4a.s: Add Tag_ABI_FP_number_model and
Tag_ABI_VFP_args.
* ld-arm/attr-merge-4b.s: Likewise.
* ld-arm/attr-merge-4.attr: Likewise.
* ld-arm/attr-merge-6a.s: Likewise.
* ld-arm/attr-merge-6b.s: Likewise.
* ld-arm/attr-merge-6.attr: Add Tag_ABI_FP_number_model.
GDB Administrator [Thu, 25 Dec 2014 00:00:09 +0000 (00:00 +0000)]
Automatic date update in version.in
H.J. Lu [Wed, 24 Dec 2014 22:14:14 +0000 (14:14 -0800)]
Add cast to unsigned long
* pei-x86_64.c (pex64_bfd_print_pdata_section): Add cast to
unsigned long.
Andrew Burgess [Tue, 23 Dec 2014 17:46:45 +0000 (17:46 +0000)]
AVR: Document linker relaxation related options.
Adds documentation describing the -mlink-relax and -mno-link-relax
command line options.
gas/ChangeLog:
* doc/c-avr.texi: Document -mlink-relax and -mno-link-relax.
Andrew Burgess [Mon, 27 Oct 2014 10:51:17 +0000 (10:51 +0000)]
AVR: Assembler now prepares for linker relaxation by default.
Have the assembler prepare for linker relaxation by default. This
means that users will be able to make use of linker relaxation without
having to adjust the assembler flags, this can make life easier when
compiling libraries.
Having this on by default in the assembler should make no difference to
the assembler code produced, however, some of the debug information will
be slightly less compressed.
A few tests needed to be updated as a result of this change as they
relied on linker relaxation support being off by default.
I've tightened up the definition of which sections can be relaxed on AVR
as part of this commit, the assembler used to think that all
non-debugging sections could be relaxed, when in reality only code
sections can be relaxed for AVR. The previous definition was not
dangerous, just over cautious. The new tighter definition allows an
extra test (gas/testsuite/gas/all/forward.d) to continue to pass.
gas/ChangeLog:
* config/tc-avr.c (struct avr_opt_s): Change link_relax to
no_link_relax, extend comment.
(enum options): Add new OPTION_NO_LINK_RELAX.
(md_longopts): Add entry for -mno-link-relax.
(md_parse_option): Handle OPTION_NO_LINK_RELAX, and update
OPTION_LINK_RELAX.
(md_begin): Initialise linkrelax from no_link_relax.
(md_show_usage): Include -mno-link-relax option.
(relaxable_section): Only allocatable code sections can be
relaxed.
* config/tc-avr.h (TC_LINKRELAX_FIXUP): Define.
gas/testsuite/ChangeLog:
* gas/all/gas.exp: Test will not pass on AVR due to linker
relaxation support.
* gas/avr/noreloc_withoutrelax.d: Add -mno-link-relax option.
* gas/avr/link-relax-elf-flag-clear.d: Likewise.
ld/testsuite/ChangeLog:
* ld/testsuite/ld-avr/relax-elf-flags-02.d: Add -mno-link-relax
option.
* ld/testsuite/ld-avr/relax-elf-flags-03.d: Likewise.
* ld/testsuite/ld-avr/relax-elf-flags-04.d: Likewise.
* ld/testsuite/ld-avr/relax-elf-flags-05.d: Likewise.
* ld/testsuite/ld-avr/relax-elf-flags-06.d: Likewise.
Alexander Cherepanov [Wed, 24 Dec 2014 14:50:53 +0000 (14:50 +0000)]
This patch fixes a snafu where the -D and -U short versions of the
--enable-deterministic-archives and --disable-deteministic-archive
options were not being accepted.
PR binutils/17671
* objcopy.c (copy_main, strip_main): Add D and U to the list of
accepted short versions of long options.
Anthony Green [Wed, 24 Dec 2014 13:37:16 +0000 (08:37 -0500)]
Add support for moxie's mul.x and umul.x instructions
Anthony Green [Wed, 24 Dec 2014 13:34:23 +0000 (08:34 -0500)]
Add mul.x and umul.x instructions to moxie port
Alan Modra [Wed, 24 Dec 2014 11:37:42 +0000 (22:07 +1030)]
Don't create .eh_frame_hdr on shared lib bfd
If no object files have .eh_frame, but some shared library does, then
ld creates a .eh_frame_hdr section using the shared library bfd. This
is silly since shared library .eh_frame sections don't contribute to
the output .eh_frame and thus no .eh_frame_hdr is needed.
Also, the bfd section list and count is cleared for shared libraries,
and a zero section count used as a flag in lang_check to omit a call
to bfd_merge_private_bfd_data for shared libraries. If we create a
section on a shared lib bfd then ld will wrongly attempt to merge the
shared library private bfd data.
PR 17742
* ld/emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Exclude
shared libraries in loop looking for .eh_frame sections.
Similarly for build-id loop.
Pierre Muller [Wed, 24 Dec 2014 10:06:57 +0000 (10:06 +0000)]
This patch adds support for printing out the pdata section of PE objects.
* pe-x86_64.c (pex64_bfd_print_pdata): Add external
declaration.
(bfd_pe_print_data): Set macro to pex64_bfd_print_data.
* pei-x86_64.c (pex64_bfd_print_pdata): Changed to
global function. Now handles multiple .pdata sections.
(pex_bfd_print_pdata_section): New static helper function,
using most of old pex_bfd_print_pdata function code, but adding
support for coff pe objects, which might have some fields
starting at zero offset.
(pex64_print_all_pdata_sections) : New static helper function,
used in call to bfd_map_over_sections inside new
pex66_bfd_print_pdata function.
(bfd_boolean pdata_count): New static variable, used to return
bfd_boolean value for pex64_bfd_print_pdata function.
Nick Clifton [Wed, 24 Dec 2014 08:21:50 +0000 (08:21 +0000)]
Reverts an "enhancement" made in a previous delta which complained of
unprocessed augmentation data at the end of a CIE.
* dwarf.c (read_cie): Revert check for unused augmentation data -
it was bogus.
Alan Modra [Wed, 24 Dec 2014 01:22:26 +0000 (11:52 +1030)]
Fix generic linker symbol output when weak is overridden by strong
Yes, I know this also affects bfd_link_hash_indirect, but output of
indirect and warning symbols looks quite broken anyway.
* linker.c (_bfd_generic_link_output_symbols): Remove BSF_WEAK
flag from bfd_link_hash_defined symbols.
Alan Modra [Tue, 23 Dec 2014 14:33:44 +0000 (01:03 +1030)]
Yet another DEFINED testcase
* ld-scripts/defined6.s,
* ld-scripts/defined6.t,
* ld-scripts/defined6.d: New test.
* ld-scripts/defined.exp: Run it.
GDB Administrator [Wed, 24 Dec 2014 00:00:10 +0000 (00:00 +0000)]
Automatic date update in version.in
Andrew Stubbs [Tue, 23 Dec 2014 20:28:16 +0000 (20:28 +0000)]
Clarify strip docs.
binutils/
* objcopy.c (strip_usage): Reword --remove-section description.
* doc/binutils.texi (strip): Likewise.
Doug Evans [Tue, 23 Dec 2014 15:55:39 +0000 (07:55 -0800)]
Look up primitive types as symbols.
gdb/ChangeLog:
* ada-lang.c (user_select_syms): Only fetch symtab if symbol is
objfile-owned.
(cache_symbol): Ignore symbols that are not objfile-owned.
* block.c (block_objfile): New function.
(block_gdbarch): New function.
* block.h (block_objfile): Declare.
(block_gdbarch): Declare.
* c-exp.y (classify_name): Remove call to
language_lookup_primitive_type. No longer necessary.
* gdbtypes.c (lookup_typename): Call lookup_symbol_in_language.
Remove call to language_lookup_primitive_type. No longer necessary.
* guile/scm-symbol.c (syscm_gdbarch_data_key): New static global.
(syscm_gdbarch_data): New struct.
(syscm_init_arch_symbols): New function.
(syscm_get_symbol_map): Renamed from syscm_objfile_symbol_map.
All callers updated. Handle symbols owned by arches.
(gdbscm_symbol_symtab): Handle symbols owned by arches.
(gdbscm_initialize_symbols): Initialize syscm_gdbarch_data_key.
* language.c (language_lookup_primitive_type_1): New function.
(language_lookup_primitive_type): Call it.
(language_alloc_type_symbol): New function.
(language_init_primitive_type_symbols): New function.
(language_lookup_primitive_type_as_symbol): New function.
* language.h (struct language_arch_info) <primitive_type_symbols>:
New member.
(language_lookup_primitive_type): Add function comment.
(language_lookup_primitive_type_as_symbol): Declare.
* printcmd.c (address_info): Handle arch-owned symbols.
* python/py-symbol.c (sympy_get_symtab): Ditto.
(set_symbol): Ditto.
(sympy_dealloc): Ditto.
* symmisc.c (print_symbol): Ditto.
* symtab.c (fixup_symbol_section): Ditto.
(lookup_symbol_aux): Initialize block_found.
(basic_lookup_symbol_nonlocal): Try looking up the symbol as a
primitive type.
(initialize_objfile_symbol_1): New function.
(initialize_objfile_symbol): Call it.
(allocate_symbol): Call it.
(allocate_template_symbol): Call it.
(symbol_objfile): Assert symbol is objfile-owned.
(symbol_arch, symbol_symtab, symbol_set_symtab): Ditto.
* symtab.h (struct symbol) <owner>: Replaces member "symtab".
(struct symbol) <is_objfile_owned>: New member.
(SYMBOL_OBJFILE_OWNED): New macro.
* cp-namespace.c (cp_lookup_bare_symbol): New arg langdef.
All callers updated. Try to find the symbol as a primitive type.
(lookup_namespace_scope): New arg langdef. All callers updated.
Call cp_lookup_bare_symbol directly for simple bare symbols.
Andrew Burgess [Sat, 22 Nov 2014 23:25:17 +0000 (23:25 +0000)]
AVR/ld: Propagate link-relax elf header flag correctly.
The AVR target has an elf header flag to indicate if an object was
assembler ready for linker relaxation. If a partial link is performed
then it is important that the link-relax flag in the output object is
set correctly, otherwise, during the final link, we might try to perform
linker relaxation on code that was not assembled suitably.
As the link-relax elf header covers the entire object file we must be
conservative when setting the flag in the output object, so, for a
partial link, any input object that does not have the link-relax flag
set will cause the output object to also not have the link-relax flag
set.
This conservative approach could be softened in future, we only need to
disable the link relax flag if an input file is not marked link-relax
ready, and the input file contains a relaxable section. However, I've
left this optimisation for a later day.
For the final link I've overloaded the use of the link-relax elf header
flag, in a final executable, the flag now indicates if the executable
was built with linker relaxation on or not.
ld/ChangeLog:
* emultempl/avrelf.em: Add include of elf/avr.h.
(avr_finish): New function.
(LDEMUL_FINISH): Added.
ld/testsuite/ChangeLog:
* ld-avr/relax-elf-flags-01.d: New file.
* ld-avr/relax-elf-flags-02.d: New file.
* ld-avr/relax-elf-flags-03.d: New file.
* ld-avr/relax-elf-flags-04.d: New file.
* ld-avr/relax-elf-flags-05.d: New file.
* ld-avr/relax-elf-flags-06.d: New file.
* ld-avr/relax-elf-flags-07.d: New file.
* ld-avr/relax-elf-flags-08.d: New file.
* ld-avr/relax-elf-flags-a.s: New file.
* ld-avr/relax-elf-flags-b.s: New file.
Andrew Burgess [Sat, 22 Nov 2014 23:19:31 +0000 (23:19 +0000)]
AVR: Only set link-relax elf flag when appropriate.
The AVR target uses a bit in the elf header flags to indicate if the
object was assembled ready for linker relaxation. Previously this flag
was always set, even when the object was not assembled ready for linker
relaxation.
This patch moves setting of the flag into the assembler, and sets it
only when the assembler is preparing the file for linker relaxation.
bfd/ChangeLog:
* elf32-avr.c (bfd_elf_avr_final_write_processing): Don't set
EF_AVR_LINKRELAX_PREPARED unconditionally.
gas/ChangeLog:
* config/tc-avr.c: Add include for elf/avr.h.
(avr_elf_final_processing): New function.
* config/tc-avr.h (elf_tc_final_processing): Define.
(avr_elf_final_processing): Declare
gas/testsuite/ChangeLog:
* gas/avr/link-relax-elf-flag-clear.d: New file.
* gas/avr/link-relax-elf-flag-set.d: New file.
* gas/avr/link-relax-elf-flag.s: New file.
Doug Evans [Tue, 23 Dec 2014 15:31:00 +0000 (07:31 -0800)]
symtab.h (SYMBOL_DOMAIN_BITS): New macro.
gdb/ChangeLog:
* symtab.h (SYMBOL_DOMAIN_BITS): New macro.
(struct symbol) <domain>: Use it.
Doug Evans [Tue, 23 Dec 2014 15:28:28 +0000 (07:28 -0800)]
initialize_objfile_symbol: Renamed from initialize_symbol.
gdb/ChangeLog:
* symtab.c (initialize_objfile_symbol): Renamed from initialize_symbol.
All callers updated.
Doug Evans [Tue, 23 Dec 2014 15:24:48 +0000 (07:24 -0800)]
Add langdef arg to la_lookup_symbol_nonlocal.
gdb/ChangeLog:
* language.h (struct language_defn) <la_lookup_symbol_nonlocal>:
New arg language_defn. All uses updated.
Doug Evans [Tue, 23 Dec 2014 15:21:10 +0000 (07:21 -0800)]
Replace some symbol accessor macros with functions.
gdb/ChangeLog:
* symtab.h (SYMBOL_SYMTAB): Delete
(SYMBOL_OBJFILE): Delete.
(symbol_symtab, symbol_set_symtab): Declare.
(symbol_objfile, symbol_arch): Declare.
* symtab.c (symbol_symtab): Replaces SYMBOL_SYMTAB. All uses updated.
All references to symbol->symtab redirected through here.
(symbol_set_symtab): New function. All assignments to SYMBOL_SYMTAB
redirected through here.
(symbol_arch): New function.
(symbol_objfile): New function. Replaces SYMBOL_OBJFILE.
All uses updated.
* cp-namespace.c (cp_lookup_symbol_imports_or_template): Call
symbol_arch.
* findvar.c (default_read_var_value): Call symbol_arch.
* guile/scm-frame.c (gdbscm_frame_block): Call symbol_objfile.
* jv-lang.c (add_class_symtab_symbol): Call symbol_arch.
* printcmd.c (address_info): Call symbol_arch.
* tracepoint.c (scope_info): Call symbol_arch.
Nick Clifton [Tue, 23 Dec 2014 13:41:13 +0000 (13:41 +0000)]
This patch add support for cpu marvell-whitney.
* gas/config/tc-arm.c (arm_cpus): Add core marvell-whitney.
Nick Clifton [Tue, 23 Dec 2014 13:11:10 +0000 (13:11 +0000)]
Reformat the objdump.1 man output to avoid overlong lines.
Alan Modra [Mon, 22 Dec 2014 00:41:50 +0000 (11:11 +1030)]
Report an error for script multiply defined symbols
or maybe not just yet, but this is better than a FIXME.
* ldexp.c (update_definedness): Return false if script symbol is
redefining a strong symbol in an object.
(exp_fold_tree_1 <etree_assign>): Set up for reporting a multiple
definition error, but for now leave disabled.
Alan Modra [Tue, 23 Dec 2014 08:37:23 +0000 (19:07 +1030)]
Use a symbol flag bit to mark linker defined symbols
Trying to use the SEC_LINKER_CREATED section flag to determine whether
a symbol is linker defined fails to work on targets like alpha that
define special SEC_COMMON sections. These might contain symbols that
originated in an object file.
include/
* bfdlink.h (struct bfd_link_hash_entry): Comment non_ir_ref. Add
linker_def.
bfd/
* elflink.c (_bfd_elf_define_linkage_sym): Set linker_def.
* linker.c (_bfd_generic_link_add_one_symbol): Clear linker_def
for CDEF, DEF, DEFW, COM.
ld/
* ldexp.c (exp_fold_tree_1 <etree_provide>): Test linker_def.
ld/testsuite/
* ld-powerpc/sdabase.s,
* ld-powerpc/sdabase.t,
* ld-powerpc/sdabase.d: New test.
* ld-powerpc/sdabase2.t,
* ld-powerpc/sdabase2.d: New test.
* ld-powerpc/powerpc.exp: Run them.
Alan Modra [Mon, 22 Dec 2014 00:19:23 +0000 (10:49 +1030)]
Don't PROVIDE over top of common symbols
This:
int end[100000];
int main(void) { end[99999] = 0; return 0; }
should not segfault.
ld/
* ldexp.c (exp_fold_tree_1 <etree_provide>): Leave bfd_link_hash_common
symbols alone.
ld/testsuite/
* ld-elf/endsym.s, *ld-elf/endsym.d: New test.
Alan Modra [Mon, 22 Dec 2014 04:13:49 +0000 (14:43 +1030)]
Correct logic for "defined by object"
The old code missed testing bfd_link_hash_undefweak, and wrongly
excluded bfd_link_hash_common symbols. It is also clearer to invert
the set of enum bfd_link_hash_type values tested.
bfd_link_hash_indirect and bfd_link_hash_warning will never appear
here.
* ldexp.c (update_definedness): Correct logic setting by_object.
Alan Modra [Mon, 22 Dec 2014 00:15:13 +0000 (10:45 +1030)]
Move support code for linker script DEFINED to ldexp.c
This moves support code for DEFINED to ldexp.c where it is used,
losing the lang_ prefix on identifiers. Two new functions are needed
to initialize and clean up to hash table, but other than that there
are no functional changes here.
* ldexp.c (struct definedness_hash_entry, definedness_table)
(definedness_newfunc, symbol_defined, update_definedness): Move
and rename from..
* ldlang.h (struct lang_definedness_hash_entry): ..here,..
* ldlang.c (lang_definedness_table, lang_definedness_newfunc)
(lang_symbol_defined, lang_update_definedness): ..and here.
* ldexp.c (ldexp_init, ldexp_finish): New functions, extracted from..
* ldlang.c (lang_init, lang_finish): ..here.
* ldexp.h (ldexp_init, ldexp_finish): Declare.
* ldlang.h (lang_symbol_defined, lang_update_definedness): Delete.
* ldmain.c (main): Call ldexp_init and ldexp_finish.
Nick Clifton [Tue, 23 Dec 2014 12:39:34 +0000 (12:39 +0000)]
Updated translations for the gas and gprof tools.
* po/es.po: Updated Esperanto translation.
* po/fr.po: Updated French translation.
* po/uk.po: Updated Ukrainian translation.
GDB Administrator [Tue, 23 Dec 2014 00:00:12 +0000 (00:00 +0000)]
Automatic date update in version.in
H.J. Lu [Mon, 22 Dec 2014 23:29:21 +0000 (15:29 -0800)]
Cast size to long to warn
* dwarf.c (read_cie): Cast size to long to warn.
Nick Clifton [Mon, 22 Dec 2014 22:44:34 +0000 (22:44 +0000)]
More fixes for invalid memory accesses exposed by fuzzed binaries.
PR binutils/17531
* dwarf.c (decode_location_expression): Check for an out of range
value for a DW_OP_GNU_entry_value expression.
(display_debug_lines_raw): Check for a partial
.debug_line. section being encountered without a prior, full
.debug.line section.
(display_debug_lines_decoded): Likewise. Also check for
li_line_range being zero.
(display_debug_pubnames_worker): Check for an invalid pn_length
field.
(read_cie): Add range checks.
* elfcomm.c (setup_archive): Check for a negative longnames_size.
Nick Clifton [Mon, 22 Dec 2014 20:59:00 +0000 (20:59 +0000)]
More fixes for memory access violations exposed by fuzzed binaries.
PR binutils/17512
* archive.c (do_slurp_bsd_armap): Return if the parsed_size is
zero.
(bfd_slurp_armap): Zero terminate the name.
(bfd_generic_stat_arch_elt): If there is no header, fail.
* elf32-arc.c (arc_info_to_howto_rel): Replace BFD_ASSERT with
error message.
* elf32-avr.c (avr_info_to_howto_rela): Likewise.
* elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
* elf32-cris.c (cris_info_to_howto_rela): Likewise.
* elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
* elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
* elf32-dlx.c (dlx_rtype_to_howto): Likewise.
* elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
* elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
* elf32-frv.c (frv_info_to_howto_rela): Likewise.
* elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
* elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
* elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
* elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
* elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
* elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
* elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
* elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
* elf32-mep.c (mep_info_to_howto_rela): Likewise.
* elf32-metag.c (metag_info_to_howto_rela): Likewise.
* elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
* elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
* elf32-mt.c (mt_info_to_howto_rela): Likewise.
* elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
* elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
* elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
* elf32-rx.c (rx_info_to_howto_rela): Likewise.
* elf32-v850.c (v850_elf_info_to_howto_rel): Likewise.
* elf32-visium.c (visium_info_to_howto_rela): Likewise.
* elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
* elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
* elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
* elf64-x86-64.c (elf_x86_64_reloc_type_lookup): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_bfd_reloc_from_type): Likewise.
* elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Add range
checking of reloc symbol index.
* mach-o.c (bfd_mach_o_canonicalize_one_reloc): If no symbols have
been provided then set the reloc's symbol to undefined.
* reloc.c (bfd_generic_get_relocated_section_contents): Add range
checking of the reloc to be applied.
* versados.c (process_otr): Add more range checks.
(versados_canonicalize_reloc): If the section is unknown, set the
symbol to undefined.
* vms-alpha.c (_bfd_vms_slurp_eisd): Add range checks.
(alpha_vms_object_p): Likewise.
Cary Coutant [Mon, 22 Dec 2014 18:13:37 +0000 (10:13 -0800)]
gold/
* powerpc.cc (Target_powerpc::relocate): Fix overflow check.
Doug Evans [Mon, 22 Dec 2014 17:29:25 +0000 (09:29 -0800)]
cp-namespace.c (cp_lookup_symbol_via_all_imports): New function.
gdb/ChangeLog:
* cp-namespace.c (cp_lookup_symbol_via_all_imports): New function.
(cp_lookup_symbol_namespace): Call it.
(cp_lookup_symbol_nonlocal): Ditto.
Doug Evans [Mon, 22 Dec 2014 17:20:50 +0000 (09:20 -0800)]
cp-namespace.c (cp_lookup_symbol_via_imports): New arg "search_scope_first".
gdb/ChangeLog:
* cp-namespace.c (cp_lookup_symbol_via_imports): New arg
"search_scope_first". All callers updated.