[Bug binutils/17141] New: Incorrect result check of _bfd_elf_strtab_add() in bfd/elf.c

2014-07-11 Thread maksqwe1 at ukr dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=17141

Bug ID: 17141
   Summary: Incorrect result check of _bfd_elf_strtab_add() in
bfd/elf.c
   Product: binutils
   Version: 2.25 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: maksqwe1 at ukr dot net

bfd/elf.c 5255

  elf_tdata (abfd)->symtab_hdr.sh_name =
(unsigned int) _bfd_elf_strtab_add (shstrtab, ".symtab", FALSE);
  elf_tdata (abfd)->strtab_hdr.sh_name =
(unsigned int) _bfd_elf_strtab_add (shstrtab, ".strtab", FALSE);
  elf_tdata (abfd)->shstrtab_hdr.sh_name =
(unsigned int) _bfd_elf_strtab_add (shstrtab, ".shstrtab", FALSE);

  if (elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1 // <===
   || elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1 // <===
   || elf_tdata (abfd)->shstrtab_hdr.sh_name == (unsigned int) -1)
return FALSE;

Copy/paste typo. Should be:
  if (elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1
   || elf_tdata (abfd)->strtab_hdr.sh_name == (unsigned int) -1
   || elf_tdata (abfd)->shstrtab_hdr.sh_name == (unsigned int) -1)
return FALSE;

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

Paolo Pedroni  changed:

   What|Removed |Added

 CC||paolo.pedroni at iol dot it

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #5 from Paolo Pedroni  ---
Created attachment 7696
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7696&action=edit
Linker script

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #7 from Paolo Pedroni  ---
Created attachment 7697
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7697&action=edit
object files

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #8 from Paolo Pedroni  ---
Created attachment 7698
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7698&action=edit
/var/tmp/portage/app-emulation/virtualbox-4.3.12/work/VirtualBox-4.3.12/out/linux.amd64/release/obj/iPxeBaseBin/src/arch/i386/core/relocate.o

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

Paolo Pedroni  changed:

   What|Removed |Added

   Attachment #7697|object files|/var/tmp/portage/app-emulat
description||ion/virtualbox-4.3.12/work/
   ||VirtualBox-4.3.12/out/linux
   ||.amd64/release/obj/iPxeBase
   ||Bin/src/arch/i386/core/base
   ||mem_packet.o

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #10 from Paolo Pedroni  ---
Created attachment 7700
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7700&action=edit
/var/tmp/portage/app-emulation/virtualbox-4.3.12/work/VirtualBox-4.3.12/out/linux.amd64/release/obj/iPxeBaseBin/src/arch/i386/firmware/pcbios/basemem.o

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #11 from Paolo Pedroni  ---
Created attachment 7701
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7701&action=edit
/var/tmp/portage/app-emulation/virtualbox-4.3.12/work/VirtualBox-4.3.12/out/linux.amd64/release/obj/iPxeBaseBin/src/arch/i386/firmware/pcbios/bios_console.o

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #12 from Paolo Pedroni  ---
Created attachment 7702
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7702&action=edit
/var/tmp/portage/app-emulation/virtualbox-4.3.12/work/VirtualBox-4.3.12/out/linux.amd64/release/obj/iPxeBaseBin/src/arch/i386/firmware/pcbios/hidemem.o

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #9 from Paolo Pedroni  ---
Created attachment 7699
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7699&action=edit
/var/tmp/portage/app-emulation/virtualbox-4.3.12/work/VirtualBox-4.3.12/out/linux.amd64/release/obj/iPxeBaseBin/src/arch/i386/core/timer2.o

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #13 from Paolo Pedroni  ---
Created attachment 7703
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7703&action=edit
/var/tmp/portage/app-emulation/virtualbox-4.3.12/work/VirtualBox-4.3.12/out/linux.amd64/release/obj/iPxeBaseBin/src/arch/i386/firmware/pcbios/memmap.o

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #15 from Paolo Pedroni  ---
Created attachment 7705
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7705&action=edit
/var/tmp/portage/app-emulation/virtualbox-4.3.12/work/VirtualBox-4.3.12/out/linux.amd64/release/obj/iPxeBaseBin/src/arch/i386/image/bootsector.o

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #14 from Paolo Pedroni  ---
Created attachment 7704
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7704&action=edit
/var/tmp/portage/app-emulation/virtualbox-4.3.12/work/VirtualBox-4.3.12/out/linux.amd64/release/obj/iPxeBaseBin/src/arch/i386/hci/commands/reboot_cmd.o

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #16 from Paolo Pedroni  ---
Created attachment 7706
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7706&action=edit
/var/tmp/portage/app-emulation/virtualbox-4.3.12/work/VirtualBox-4.3.12/out/linux.amd64/release/obj/iPxeBaseBin/src/arch/i386/image/pxe_image.o

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

--- Comment #17 from Paolo Pedroni  ---
Created attachment 7707
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7707&action=edit
All the other object files (tar.gz compressed for convenience)

-- 
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 gold/16389] gold throws "internal error in segment_precedes" when building VirtualBox 4.3.6

2014-07-11 Thread paolo.pedroni at iol dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=16389

Paolo Pedroni  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|DUPLICATE   |---

--- Comment #6 from Paolo Pedroni  ---
Still broken with current git gold and virtualbox-4.3.12. I'm attaching all the
relevant files: be patient, as there's a lot of those.

-- 
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/17141] Incorrect result check of _bfd_elf_strtab_add() in bfd/elf.c

2014-07-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17141

--- Comment #1 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  17ca87fc69f554aecc4a7f8d6d354a6ad9bec7be (commit)
  from  808f7ab1fc88da40007c17a20e49928359f27491 (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=17ca87fc69f554aecc4a7f8d6d354a6ad9bec7be

commit 17ca87fc69f554aecc4a7f8d6d354a6ad9bec7be
Author: Maks Naumov 
Date:   Fri Jul 11 23:55:30 2014 +0930

Fix typo in _bfd_elf_strtab_add

PR 17141
* elf.c (_bfd_elf_strtab_add): Check strtab name for failure.

---

Summary of changes:
 bfd/ChangeLog |5 +
 bfd/elf.c |2 +-
 2 files changed, 6 insertions(+), 1 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/17141] Incorrect result check of _bfd_elf_strtab_add() in bfd/elf.c

2014-07-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17141

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||amodra at gmail dot com
 Resolution|--- |FIXED

--- Comment #2 from Alan Modra  ---
Patch applied, thanks!

-- 
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/17117] [2.23 Regression] assertion fail elf32-i386.c:4016 with GNU2 TLS

2014-07-11 Thread amonakov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17117

Alexander Monakov  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com
   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=17057
Summary|assertion fail  |[2.23 Regression] assertion
   |elf32-i386.c:4016   |fail elf32-i386.c:4016 with
   ||GNU2 TLS

--- Comment #1 from Alexander Monakov  ---
Bug #17057 looks related if not the same.

This appears to be a regression starting from the following commit:

commit e1f987424b7b3f5ac63a2a6ae044a202a44b8ff8
Author: H.J. Lu 
Date:   Fri Oct 21 15:13:37 2011 +

Put IRELATIVE relocations after JUMP_SLOT.

bfd/

2011-10-21  H.J. Lu  

PR ld/13302
* elf32-i386.c (elf_i386_link_hash_table): Add next_jump_slot_index
and next_irelative_index.
(elf_i386_link_hash_table_create): Initialize next_jump_slot_index
and next_irelative_index.
(elf_i386_allocate_dynrelocs): Increment reloc_count instead of
next_tls_desc_index.
(elf_i386_size_dynamic_sections): Set next_tls_desc_index and
next_irelative_index from reloc_count.
(elf_i386_finish_dynamic_symbol): Put R_386_IRELATIVE after
R_386_JUMP_SLOT.

-- 
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/17057] Production of DSOs using TLSDESC is utterly broken on i386

2014-07-11 Thread amonakov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17057

Alexander Monakov  changed:

   What|Removed |Added

   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=17117

-- 
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/17117] [2.23 Regression] assertion fail elf32-i386.c:4016 with GNU2 TLS

2014-07-11 Thread bugdal at aerifal dot cx
https://sourceware.org/bugzilla/show_bug.cgi?id=17117

Rich Felker  changed:

   What|Removed |Added

 CC||bugdal at aerifal dot cx

--- Comment #2 from Rich Felker  ---
Yes this is almost certainly the same as my issue. Any chance it's easy to fix?

-- 
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