[Bug binutils/17541] addr2line: function names in anonymous namespaces are incorrectly reported.

2014-12-09 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17541

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

--- Comment #1 from Alan Modra  ---
This is because bfd/dwarf2.c doesn't decode the pertinent C++ DWARF
information.

The reason the old binutils "works" when given an object compiled by a new gcc
is (at a guess) due to not decoding the DWARF, and thus falling back to looking
at the symbol table.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/17512] segfault in PE parser / _bfd_pei_swap_aouthdr_in

2014-12-09 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17512

--- Comment #123 from cvs-commit at gcc dot gnu.org  ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
   via  f64e188b58f4aab4cbd03aa6e9fc1aa602546e26 (commit)
  from  137d1369ac054744d27f19e95aa8a739e6c0068d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f64e188b58f4aab4cbd03aa6e9fc1aa602546e26

commit f64e188b58f4aab4cbd03aa6e9fc1aa602546e26
Author: Nick Clifton 
Date:   Tue Dec 9 12:42:18 2014 +

More fixes for memory access violations triggered by fuzzed binaries.

PR binutils/17512
* objdump.c (display_any_bfd): Avoid infinite loop closing and
opening the same archive again and again.

* archive64.c (bfd_elf64_archive_slurp_armap): Add range checks.
* libbfd.c (safe_read_leb128): New function.
* libbfd-in.h (safe_read_leb128): Add prototype.
* libbfd.h: Regenerate.
* elf-attrs.c (_bfd_elf_parse_attributes): Use safe_read_leb128.
Check for an over-long subsection length.
* elf.c (elf_parse_notes): Check that the namedata is long enough
for the string comparison that is about to be performed.
(elf_read_notes): Zero-terminate the note buffer.

---

Summary of changes:
 bfd/ChangeLog  |   13 
 bfd/archive64.c|   11 +-
 bfd/elf-attrs.c|   15 -
 bfd/elf.c  |   53 ---
 bfd/libbfd-in.h|2 +
 bfd/libbfd.c   |   39 ++
 bfd/libbfd.h   |2 +
 binutils/ChangeLog |6 +
 binutils/objdump.c |   10 -
 9 files changed, 119 insertions(+), 32 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/17512] segfault in PE parser / _bfd_pei_swap_aouthdr_in

2014-12-09 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17512

--- Comment #124 from Nick Clifton  ---
(In reply to Alexander Cherepanov from comment #122)

> Errors:
>   1 Conditional jump or move depends on uninitialised value(s)
>  45 Invalid read of size ...
>   2 Invalid write of size ...
>   3 Process terminating with default action of signal 11 (SIGSEGV)

Fixed...

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17689] New: PIE copy relocations handling broken with ld.bfd

2014-12-09 Thread markus at trippelsdorf dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=17689

Bug ID: 17689
   Summary: PIE copy relocations handling broken with ld.bfd
   Product: binutils
   Version: 2.26 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: hjl.tools at gmail dot com
  Reporter: markus at trippelsdorf dot de

See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64237

 % cat nscd.i
extern int program_invocation_name;
extern void fn2(int, int);
void
fn1() { fn2(0, program_invocation_name); }

 % gcc -fuse-ld=bfd -O2 -pie -fPIE nscd.i
/usr/lib/x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/home/trippels/bin/ld.bfd: /home/trippels/tmp/ccAUYBy5.o: relocation
R_X86_64_PC32 against undefined symbol `program_invocation_name@@GLIBC_2.2.5'
can not be used when making a shared object; recompile with -fPIC

Gold is fine.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/17666] ld -r may create reloc sections with unordered relocs

2014-12-09 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17666

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
   via  28dbcedc7b1282b93c3f25c4e42ae71b44e8e2a8 (commit)
  from  4e3272393ff1ab2c07d9fa209d2ae82954f7954c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=28dbcedc7b1282b93c3f25c4e42ae71b44e8e2a8

commit 28dbcedc7b1282b93c3f25c4e42ae71b44e8e2a8
Author: Alan Modra 
Date:   Tue Dec 9 14:32:22 2014 +1030

Don't sort ld -r relocs for mips

HI16/LO16 are deliberately put adjacent, which might mean relocs are
then not sorted by r_offset.  See tc-mips.c:mips_frob_file.  Don't undo
the HI16/LO16 sorting.

PR 17666
* elf-bfd.h (struct elf_backend_data): Add sort_relocs_p.
* elfxx-target.h (elf_backend_sort_relocs_p): Define.
(elfNN_bed): Init new field.
* elflink.c (elf_link_adjust_relocs): Conditionally sort.
(bfd_elf_final_link): Control sorting of relocs.
* elfxx-mips.c (_bfd_mips_elf_sort_relocs_p): New function.
* elfxx-mips.h (_bfd_mips_elf_sort_relocs_p): Declare.
* elf32-mips.c (elf_backend_sort_relocs_p): Define.
* elf64-mips.c (elf_backend_sort_relocs_p): Define.

---

Summary of changes:
 bfd/ChangeLog  |   13 +
 bfd/elf-bfd.h  |5 +
 bfd/elf32-mips.c   |2 ++
 bfd/elf64-mips.c   |1 +
 bfd/elflink.c  |   51 +--
 bfd/elfxx-mips.c   |   12 
 bfd/elfxx-mips.h   |2 ++
 bfd/elfxx-target.h |4 
 8 files changed, 68 insertions(+), 22 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils