The testcase in pr16417 comment #6 produces a map file showing
libpthread.so.0 (write@@GLIBC_2.2.5)
ie. missing the file referencing the symbol.
* elflink.c (_bfd_elf_add_default_symbol): Pass poldbfd when
merging non-default sym.
The linker script documentation does not mention the optional comma
that may follow an output section command or an overlay command.
In some cases, where a fill expression is used, and the next
output section command begins with an operator (e.g., "/DISCARD/"),
the comma may be required to separate the two commands.
Currently, GNU ld doesn't require the comma, but gold does.
ld/
PR gold/16804
* ld.texinfo: Document optional comma following output section
command and overlay command.
bfd/
* mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index
of output_section.
* mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto.
When aligning input sections, we are supposed to take the fill pattern
from a FILL statement, if there is one in the output section statement.
ld/
* ldlang.c (lang_size_sections_1 <lang_input_section_enum>): Use
current "fill", not "output_section_statement->fill".
ld/testsuite/
* ld-scripts/fill.d, * ld-scripts/fill.t, * ld-scripts/fill_0.s,
* ld-scripts/fill_1.s, * ld-scripts/fill_2.s: New test.
* ld-scripts/data.exp: Run it.
section before dereferencing.
(pe_print_idata, pe_print_edata, pe_print_reloc)
(rsrc_print_section): Don't bother interpreting the contents
of sections which have no contents.
long type instead of long long meant that bfd_seek (SET) could be called with a
negative offset.
PR ld/16803
* elf.c (_bfd_elf_set_section_contents): Use correct type to hold
file position.
and have it loaded by default (as long as the --target option isn't used).
PR binutils/14698
ar.c: Set plugin_target early if plugins are supported.
nm.c: Likewise.
Hi,
On windows host, we see the following ERROR,
(gdb) PASS: gdb.base/setshow.exp: set history filename ~/foobar.baz
ERROR OCCURED: couldn't compile regular expression pattern: invalid escape \ seq
uence
while executing
"expect -nobrace -i exp13 -timeout 10 -re {.*A problem internal to GDB has been
detected} {
fail "$message (GDB internal error)"
gdb_internal..."
invoked from within
"expect {
-i exp13 -timeout 10
-re ".*A problem internal to GDB has been detected" {
fail "$message (GDB internal error)"
gdb_internal_erro..."
("uplevel" body line 1)
invoked from within
"uplevel $body" REGEXP REG_EESCAPE {invalid escape \ sequence} couldn't compile
regular expression pattern: invalid escape \ sequenceERROR: Process no longer ex
ists
which leads to
UNRESOLVED: gdb.base/setshow.exp: show history filename (~/foobar.baz)
and this error is thrown from this test below:
gdb_test "show history filename" \
"The filename in which to record the command history is \"$HOME/foobar.baz\"..*" \
"show history filename (~/foobar.baz)"
HOME is a windows path, like C:\foo\bar. When it is used in gdb_test to match
output, the error is thrown because backslash is a special character in
regular expression. This patch is to escape backslash to fix this
error by using string_to_regexp.
gdb/testsuite:
2014-04-03 Yao Qi <yao@codesourcery.com>
* gdb.base/setshow.exp: Invoke string_to_regexp to HOME and PWD.
GCC 4.8 now adds linker plugin options by default, which conflict with the
--incremental tests in the testsuite. This patch checks whether the compiler
supports the -fno-use-linker-plugin option, and adds it to all link
commands.
2014-04-02 Cary Coutant <ccoutant@google.com>
* configure.ac (HAVE_PUBNAMES): Use C instead of C++.
(HAVE_NO_USE_LINKER_PLUGIN): Check for -fno-use-linker-plugin.
* configure: Regenerate.
* testsuite/Makefile.am (OPT_NO_PLUGINS): New macro for
-fno-use-linker-plugin.
(LINK1, CXXLINK1): Add it to the link command.
* testsuite/Makefile.in: Regenerate.
Check 8 and 16 bit PCREL fixes for overflow, since we bypass the
later overflow checks in write.c. Direct relocs are left alone,
as gcc has been known to take advantage of the silent overflows
when comparing addresses to constant ranges.
The problem was that gcc was generating assembler with missing unwind directives in it,
so that a gas_assert was being triggered. The patch replaces the assert with an error
message.
* config/tc-arm.c (create_unwind_entry): Report an error if an
attempt to recreate an unwind directive is encountered.
When a VDSO gets large enough that it doesn't entirely fit in one page,
but not so large that the part described by the program header exceeds
one page, then gdb/BFD doesn't read the section headers and symbol
table information. This patch cures that by passing the size of the
vdso to BFD, and fixes a number of other issues in the BFD code.
bfd/
* elfcode.h (bfd_from_remote_memory): Add "size" parameter.
Consolidate code handling possible section headers past end of
segment. Don't use p_align for page size guess, instead use
minpagesize. Take note of ld.so clearing section headers when
p_memsz > p_filesz. Handle file header specifying no section
headers. Handle zero p_align throughout. Default loadbase to
zero. Add comments. Rename contents_size to high_offset, and
make it a bfd_vma. Delete unnecessary bfd_set_error calls.
* bfd-in.h (bfd_elf_bfd_from_remote_memory): Update prototpe.
* elf-bfd.h (struct elf_backend_data <elf_backend_from_remote_memory>):
Likewise.
(_bfd_elf32_bfd_from_remote_memory): Likewise.
(_bfd_elf64_bfd_from_remote_memory): Likewise.
* elf.c (bfd_elf_bfd_from_remote_memory): Adjust.
* bfd-in2.h: Regnerate.
gdb/
* symfile-mem.c (symbol_file_add_from_memory): Add size parameter.
Pass to bfd_elf_bfd_from_remote_memory. Adjust all callers.
(struct symbol_file_add_from_memory_args): Add size field.
(find_vdso_size): New function.
(add_vsyscall_page): Attempt to find vdso size.
binutils/
* od-macho.c (OPT_DATA_IN_CODE): New macro.
(options): Add entry for data in code.
(mach_o_help): Ditto.
(data_in_code_kind_name): New array.
(dump_data_in_code): New function.
(dump_load_command): Handle data in code.
(mach_o_dump): Ditto.
(dump_header): Display a terminal newline.
it is possible that gdb gets mach exceptions from an unknown inferior. This
happens when an inferior creates a child and that child gets a signal.
So instead of reporting messages with unknown origins, simply reply to these
notifications. The kernel will then post the unix signal.
gdb/
* darwin-nat.c (darwin_encode_reply): Add prototype.
(darwin_decode_exception_message): Reply to unknown inferiors.
(darwin_decode_message): Handle message by id. Ignore message
to unknown inferior.
(darwin_wait): Discard unknown messages, add debug trace.
The current ppc64 single step over atomic sequence testcase is written
in C and breaks with some versions of gcc. Convert the test to
assembly and use stepi to step through it.
gdb/testsuite/
2014-04-01 Anton Blanchard <anton@samba.org>
* gdb.arch/ppc64-atomic-inst.c: Remove.
* gdb.arch/ppc64-atomic-inst.S: New file.
* gdb.arch/ppc64-atomic-inst.exp: Adapt for asm based testcase.
* NEWS: Mention it.
* solib.c (solib_read_symbols): Only print symbol loading messages
if requested.
(solib_add): If symbol loading is in "brief" mode, notify user
symbols are being loaded.
(reload_shared_libraries_1): Ditto.
* symfile.c (print_symbol_loading_off): New static global.
(print_symbol_loading_brief): New static global.
(print_symbol_loading_full): New static global.
(print_symbol_loading_enums): New static global.
(print_symbol_loading): New static global.
(print_symbol_loading_p): New function.
(symbol_file_add_with_addrs): Only print symbol loading messages
if requested.
(_initialize_symfile): Register "print symbol-loading" set/show
command.
* symfile.h (print_symbol_loading_p): Declare.
doc/
* gdb.texinfo (Symbols): Document set/show print symbol-loading.
testsuite/
* gdb.base/print-symbol-loading-lib.c: New file.
* gdb.base/print-symbol-loading-main.c: New file.
* gdb.base/print-symbol-loading.exp: New file.
would not honour the [no]execstack. Fully linked binaries use a special segment to indicate the
state of the stack, but relocatable object files only have sections, and .note.GNU-stack was not
being created.
* emultempl/elf32.em (_after_open): Create a .note.GNU-stack
section when performing a relocatable link with -z [no]execstack
specified.
Hi,
I find two fails in source-dir.exp on mingw32 host.
(gdb) directory /nOtExStInG/a /nOtExStInG/b /nOtExStInG/c^M
Warning: /nOtExStInG/a: No such file or directory.^M
Warning: /nOtExStInG/b: No such file or directory.^M
Warning: /nOtExStInG/c: No such file or directory.^M
Source directories searched: /nOtExStInG/a;/nOtExStInG/b;/nOtExStInG/c;$cdir;$cwd^M
(gdb) FAIL: gdb.base/source-dir.exp: directory /nOtExStInG/a /nOtExStInG/b /nOtExStInG/c
directory /nOtExStInG/b /nOtExStInG/d /nOtExStInG/c^M
Warning: /nOtExStInG/b: No such file or directory.^M
Warning: /nOtExStInG/d: No such file or directory.^M
Warning: /nOtExStInG/c: No such file or directory.^M
Source directories searched: /nOtExStInG/b;/nOtExStInG/d;/nOtExStInG/c;/nOtExStInG/a;$cdir;$cwd^M
(gdb) FAIL: gdb.base/source-dir.exp: directory /nOtExStInG/b /nOtExStInG/d /nOtExStInG/c
The regular expression expects ':' and ';' is path separator on Windows.
This patch is to allow ';' as a path separator in regular expression.
This patch is similar to Dan's patch to fix a similar problem here
Re: directory separators on minGW hosts
https://sourceware.org/ml/gdb-patches/2006-02/msg00359.html
It is obvious. Pushed it in.
gdb/testsuite:
2014-03-31 Yao Qi <yao@codesourcery.com>
* gdb.base/source-dir.exp: Allow ';' as a directory separator.