[Bug gas/17754] Buffer overflow detected in MinGW gas

2014-12-30 Thread yselkowi at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17754

--- Comment #4 from Yaakov Selkowitz  ---
(In reply to Alan Modra from comment #1)
> Technically there is a buffer overrun here, but there are no fields
> following x_fname and x_file is not the largest element of union
> internal_auxent.  Nor is internal_auxent allocated according to which field
> is in use.  So the overrun is harmless, except of course when it triggers
> code to detect overruns.
> 
> 2.24 has exactly the same problem, and I think, all pe targets..  I expect
> you're compiling with different compilers or options in cases where you
> don't trigger the error.

Here are the logs from the successful build of 2.24 (including patches for the
recent CVEs):

https://kojipkgs.fedoraproject.org//packages/mingw-binutils/2.24/5.el6/data/logs/x86_64/build.log
https://kojipkgs.fedoraproject.org//packages/mingw-binutils/2.24/5.el6/data/logs/x86_64/root.log

And the logs for a scratch build of 2.25 (note the test failures):

https://kojipkgs.fedoraproject.org//work/tasks/8296/8498296/build.log
https://kojipkgs.fedoraproject.org//work/tasks/8296/8498296/root.log

-- 
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/17773] New: Gap between sections and section headers when ld -s is used

2014-12-30 Thread michael at talosis dot ca
https://sourceware.org/bugzilla/show_bug.cgi?id=17773

Bug ID: 17773
   Summary: Gap between sections and section headers when ld -s is
used
   Product: binutils
   Version: 2.25
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: michael at talosis dot ca

When the "-s" option is used, the binutils 2.25 linker produces ELF executables
with a 4-byte gap between the last section and the section headers.

The 2.24 linker doesn't do that, and the gap is not present if a file is linked
without "-s" and separately stripped.

I'm observing this on i386-pc-linux-uclibc with the normal (not gold) linker.

-- 
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/17773] Gap between sections and section headers when ld -s is used

2014-12-30 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17773

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |WAITING
 CC||hjl.tools at gmail dot com

--- Comment #1 from H.J. Lu  ---
Please provide a small standalone testcase.

-- 
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/17773] Gap between sections and section headers when ld -s is used

2014-12-30 Thread michael at talosis dot ca
https://sourceware.org/bugzilla/show_bug.cgi?id=17773

--- Comment #2 from Michael Deutschmann  ---
Just the two-line assembler file:

.global _start
_start: hlt

suffices to demonstrate the behavior.

If this is assembled (with as directly, no options besides -o) and linked
(directly, just -s and -o) on 2.25, the resulting file gives the following
under readelf -S:

There are 3 section headers, starting at offset 0x6c:

Section Headers:
  [Nr] Name  TypeAddr OffSize   ES Flg Lk Inf
Al
  [ 0]   NULL 00 00 00  0   0 
0
  [ 1] .text PROGBITS08048054 54 01 00  AX  0   0 
1
  [ 2] .shstrtab STRTAB   55 11 00  0   0 
1

The last section ends just before 0x66 (0x55 + 0x11).  With alignment, that
should place the section header table at 0x68.  But it's actually at 0x6c.

-- 
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/17773] Gap between sections and section headers when ld -s is used

2014-12-30 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17773

H.J. Lu  changed:

   What|Removed |Added

 Status|WAITING |NEW
 CC||amodra at gmail dot com

--- Comment #3 from H.J. Lu  ---
It is caused by

commit a485e98ea0cbb61ea9da1e7858da545e0bcf1a46
Author: Alan Modra 
Date:   Wed Sep 10 14:26:25 2014 +0930

Move ELF section headers to end of object file

Currently, section ordering differs a little for non-loaded reloc
sections output by ld -emit-relocs or ld -r and that after passing
such objects through objcopy.  Not that it really matters, but it
would be better for a simple objcopy to produce an unchanged output
object file.  Also, section headers are put somewhere in the middle of
the non-loaded sections, again slightly differently for ld and
objcopy.  This patch fixes these discrepancies and puts section
headers last, which is where gold puts them, and is where
bfd_from_remote_memory wrongly assumed they will be found.

bfd/
* elf.c (assign_file_positions_except_relocs): Move section header
placement to..
(_bfd_elf_assign_file_positions_for_relocs): ..here.  Make static.
* elf-bfd.h (_bfd_elf_assign_file_positions_for_relocs): Delete.
* elflink.c (bfd_elf_final_link): Don't call above function.

-- 
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/17773] Gap between sections and section headers when ld -s is used

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

--- Comment #4 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, hjl/pr17773 has been created
at  b72a529b6aeb4bbd07a393b0e14ea997e8c4b1ae (commit)

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

commit b72a529b6aeb4bbd07a393b0e14ea997e8c4b1ae
Author: H.J. Lu 
Date:   Tue Dec 30 14:01:27 2014 -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.

---

-- 
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/17773] Gap between sections and section headers when ld -s is used

2014-12-30 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17773

--- Comment #5 from H.J. Lu  ---
A patch is posted at

https://sourceware.org/ml/binutils/2014-12/msg00313.html

-- 
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/17489] dlltool --kill-at documentation wrong

2014-12-30 Thread daniel.c.klauer at web dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=17489

--- Comment #2 from Daniel C. Klauer  ---
Created attachment 8036
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8036&action=edit
Suggestion for better --kill-at dlltool documentation

Ok; here's a patch for the relevant part of the docs.

-- 
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/17773] Gap between sections and section headers when ld -s is used

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

--- Comment #6 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  ee3b52e917c3a19850232a6a20f5698090619fc6 (commit)
  from  24fbeb8dc2c20f86c9940cc62e6af192a9d11b1a (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=ee3b52e917c3a19850232a6a20f5698090619fc6

commit ee3b52e917c3a19850232a6a20f5698090619fc6
Author: H.J. Lu 
Date:   Tue Dec 30 19:09:11 2014 -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.

---

Summary of changes:
 bfd/ChangeLog|6 +
 bfd/elflink.c|   38 +
 ld/testsuite/ChangeLog   |8 +++
 ld/testsuite/ld-elf/binutils.exp |   15 -
 ld/testsuite/ld-elf/{lma.s => gap.s} |0
 5 files changed, 43 insertions(+), 24 deletions(-)
 copy ld/testsuite/ld-elf/{lma.s => gap.s} (100%)

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