[Bug ld/17313] --just-symbols= leads to discarded dynamic section

2014-08-27 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17313

--- 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  29a9f53e857c5d55df852d0a5d5c41a9247c16a2 (commit)
  from  2536ee9d03cb7c4af97bf4b29429bef3c30652c2 (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=29a9f53e857c5d55df852d0a5d5c41a9247c16a2

commit 29a9f53e857c5d55df852d0a5d5c41a9247c16a2
Author: H.J. Lu 
Date:   Wed Aug 27 07:39:48 2014 -0700

Don't attach dynamic sections to input from ld --just-symbols

bfd/

PR ld/17313
* elflink.c (elf_link_add_object_symbols): Don't attach dynamic
sections to input from ld --just-symbols.

2014-08-27  H.J. Lu  

PR ld/17313
* ld-i386/i386.exp (i386tests): Add tests for PR ld/17313.
* ld-x86-64/x86-64.exp (x86_64tests): Likewise.

---

Summary of changes:
 bfd/ChangeLog |6 ++
 bfd/elflink.c |   15 ++-
 ld/testsuite/ChangeLog|6 ++
 ld/testsuite/ld-i386/i386.exp |4 
 ld/testsuite/ld-x86-64/x86-64.exp |4 
 5 files changed, 30 insertions(+), 5 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 ld/17306] ld aborts when linking with --just-symbols

2014-08-27 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17306

--- Comment #7 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  c8831961f9fecf81e90fe7c8c94b47e01ee64662 (commit)
  from  29a9f53e857c5d55df852d0a5d5c41a9247c16a2 (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=c8831961f9fecf81e90fe7c8c94b47e01ee64662

commit c8831961f9fecf81e90fe7c8c94b47e01ee64662
Author: H.J. Lu 
Date:   Wed Aug 27 07:59:48 2014 -0700

Use bfd_is_abs_section to check discarded input section

bfd/

PR ld/17306
* elf32-i386.c (elf_i386_convert_mov_to_lea): Use bfd_is_abs_section
to check discarded input section.
* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.

ld/testsuite/

PR ld/17306
* ld-i386/i386.exp (i386tests): Add tests for PR ld/17306.
* ld-x86-64/x86-64.exp (x86_64tests): Likewise.

* ld-i386/pr17306a.s: New file.
* ld-i386/pr17306b.s: Likewise.
* ld-x86-64/pr17306a.s: Likewise.
* ld-x86-64/pr17306b.s: Likewise.

---

Summary of changes:
 bfd/ChangeLog |7 +++
 bfd/elf32-i386.c  |2 +-
 bfd/elf64-x86-64.c|2 +-
 ld/testsuite/ChangeLog|   11 +++
 ld/testsuite/ld-i386/i386.exp |4 
 ld/testsuite/ld-i386/pr17306a.s   |9 +
 ld/testsuite/ld-i386/pr17306b.s   |2 ++
 ld/testsuite/ld-x86-64/pr17306a.s |9 +
 ld/testsuite/ld-x86-64/pr17306b.s |2 ++
 ld/testsuite/ld-x86-64/x86-64.exp |4 
 10 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 ld/testsuite/ld-i386/pr17306a.s
 create mode 100644 ld/testsuite/ld-i386/pr17306b.s
 create mode 100644 ld/testsuite/ld-x86-64/pr17306a.s
 create mode 100644 ld/testsuite/ld-x86-64/pr17306b.s

-- 
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/17313] --just-symbols= leads to discarded dynamic section

2014-08-27 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17313

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |2.25

-- 
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/17313] --just-symbols= leads to discarded dynamic section

2014-08-27 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17313

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from H.J. Lu  ---
Fixed.

-- 
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/17306] ld aborts when linking with --just-symbols

2014-08-27 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17306

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.25

--- Comment #8 from H.J. Lu  ---
Linker crash is fixed now.  But I still don't think --just-symbols is
appropriate for your usage since symbols defined in block/iscsi.o are
converted to absolute symbols with value == 0.  You should use -Wl,-u
or -Wl,--whole-archive instead.

-- 
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/17321] New: add --enable-reloc-section option to generate proper relocation sections to .exes

2014-08-27 Thread erinn at torproject dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=17321

Bug ID: 17321
   Summary: add --enable-reloc-section option to generate proper
relocation sections to .exes
   Product: binutils
   Version: 2.24
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: erinn at torproject dot org

Created attachment 7760
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7760&action=edit
add --enable-reloc-section option

Hi,

When we were trying to build hardened .exes on Windows, we found that using
-fPIE and -pie generated broken .exes that crashed immediately. (See also:
http://sourceforge.net/p/mingw-w64/mailman/message/31167844/)After some
investigation and experimentation, a contributor of ours wrote a patch that
enables the creation of a reloc section which allows us to have functional
ASLR. We're using this with binutils 2.24 and wanted to share it in case this
is helpful, and hopefully to also get some feedback since nobody at Tor feels
capable of giving it a sufficiently good review. If it's helpful to have some
binaries to investigate that have been built with it, you can find one here:
https://people.torproject.org/~erinn/builds/hardened/torbrowser-install-4.0-alpha-1_en-US.exe
2784dea6ec561d4d4225812461274730dc004a3b8ca88c6a3360e05e3fa03741

Patch is attached, thanks in advance for any feedback.

-- 
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/17306] ld aborts when linking with --just-symbols

2014-08-27 Thread famcool at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17306

--- Comment #9 from Fam Zheng  ---
Thanks for the fix!

Fam

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