[Bug ld/22983] --dynamic-list=export is ignored in presence of -flto

2018-03-20 Thread rguenth at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

Richard Biener  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

-- 
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/22983] --dynamic-list=export is ignored in presence of -flto

2018-03-20 Thread kyukhin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

Kirill Yukhin  changed:

   What|Removed |Added

 CC||kyukhin at gcc dot gnu.org

--- Comment #3 from Kirill Yukhin  ---
(In reply to H.J. Lu from comment #2)
> A patch is posted at
> 
> https://sourceware.org/ml/binutils/2018-03/msg00237.html

HJ,
will release policies allow to back port the fix to 2.30?

-- 
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/22985] New: ld: linux kernels built with 2.31 do not boot

2018-03-20 Thread manuel.lauss at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22985

Bug ID: 22985
   Summary: ld: linux kernels built with 2.31 do not boot
   Product: binutils
   Version: 2.31 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: manuel.lauss at gmail dot com
  Target Milestone: ---

Hello,

Linux kernels built with binutils HEAD, starting some time after 27.02.2018, no
longer boot, but immediately cause a reboot.

The final vmlinux binary is ~5MB smaller (out of ~600MB), and the .text section
starts at 0x1000, instead of the usual 0x2:

--- good.txt2018-03-20 09:35:37.614685097 +0100
+++ bad.txt 2018-03-20 09:35:52.111352335 +0100
@@ -10,7 +10,7 @@ ELF Header:
   Version:   0x1
   Entry point address:   0x100
   Start of program headers:  64 (bytes into file)
-  Start of section headers:  650727648 (bytes into file)
+  Start of section headers:  645898400 (bytes into file)
   Flags: 0x0
   Size of this header:   64 (bytes)
   Size of program headers:   56 (bytes)
@@ -22,78 +22,78 @@ ELF Header:
 Section Headers:
   [Nr] Name  TypeAddress  OffSize   ES Flg
Lk Inf Al
   [ 0]   NULL 00 00 00
 0   0  0
-  [ 1] .text PROGBITS8100 20 e03000 00  AX
 0   0 64
-  [ 2] .rela.textRELA 1164bb58 7362c0 18  
I 70   1  8
[...]
+  [ 1] .text PROGBITS8100 001000 e03000 00  AX
 0   0 64
+  [ 2] .rela.textRELA 111b0b18 7362c0 18  
I 70   1  8


I'll try to find the culprit via bisection, last working version I have is HEAD
as of 27.02.2018.

Thanks!
 Manuel

-- 
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/22985] binutils: x86-64 linux kernels built with 2.31 do not boot

2018-03-20 Thread manuel.lauss at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22985

Manuel Lauss  changed:

   What|Removed |Added

Summary|ld: linux kernels built |binutils: x86-64 linux
   |with 2.31 do not boot   |kernels built with 2.31 do
   ||not boot

-- 
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/22985] binutils: x86-64 linux kernels built with 2.31 do not boot

2018-03-20 Thread manuel.lauss at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22985

--- Comment #1 from Manuel Lauss  ---
Patch "ld: Add --enable-separate-code" by H.J. Lu (git commit
f6aec96dce1ddbd8961a3aa8a2925db2021719bb) is the first bad one.  I suppose
linux has to be patched to disable this feature?

-- 
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/22983] --dynamic-list=export is ignored in presence of -flto

2018-03-20 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

--- Comment #4 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by H.J. Lu :

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

commit 416c34d683f2a17aefe19afb466af4316c7c603b
Author: H.J. Lu 
Date:   Tue Mar 20 03:51:26 2018 -0700

Set non_ir_ref_dynamic if a symbol is made dynamic

If a symbol is made dynamic by --dynamic-list, it has non-IR reference.

bfd/

PR ld/22983
* elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.

ld/

PR ld/22983
* testsuite/ld-plugin/lto.exp: Run PR ld/22983 test.
* testsuite/ld-plugin/pr22983.d: New file.
* testsuite/ld-plugin/pr22983.t: Likewise.
* testsuite/ld-plugin/pr22983a.c: Likewise.
* testsuite/ld-plugin/pr22983b.c: Likewise.

-- 
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/22983] --dynamic-list=export is ignored in presence of -flto

2018-03-20 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

--- Comment #5 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_30-branch branch has been updated by H.J. Lu
:

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

commit 7c78c26eefbb884e63817abe01e2941601e70837
Author: H.J. Lu 
Date:   Tue Mar 20 03:51:26 2018 -0700

Set non_ir_ref_dynamic if a symbol is made dynamic

If a symbol is made dynamic by --dynamic-list, it has non-IR reference.

bfd/

PR ld/22983
* elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.

ld/

PR ld/22983
* testsuite/ld-plugin/lto.exp: Run PR ld/22983 test.
* testsuite/ld-plugin/pr22983.d: New file.
* testsuite/ld-plugin/pr22983.t: Likewise.
* testsuite/ld-plugin/pr22983a.c: Likewise.
* testsuite/ld-plugin/pr22983b.c: Likewise.

(cherry picked from commit 416c34d683f2a17aefe19afb466af4316c7c603b)

-- 
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/22983] --dynamic-list=export is ignored in presence of -flto

2018-03-20 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #6 from H.J. Lu  ---
(In reply to Kirill Yukhin from comment #3)
> will release policies allow to back port the fix to 2.30?

Fixed for 2.31 and 2.30 branch.

-- 
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/22985] binutils: x86-64 linux kernels built with 2.31 do not boot

2018-03-20 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22985

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |MOVED

--- Comment #2 from H.J. Lu  ---
This is a kernel bug:

https://bugzilla.kernel.org/show_bug.cgi?id=198851

and will be fixed by

Commit-ID:  e3d03598e8ae7d195af5d3d049596dec336f569f
Gitweb: https://git.kernel.org/tip/e3d03598e8ae7d195af5d3d049596dec336f569f
Author: H.J. Lu 
AuthorDate: Mon, 19 Mar 2018 13:57:46 -0700
Committer:  Ingo Molnar 
CommitDate: Tue, 20 Mar 2018 08:03:03 +0100

x86/build/64: Force the linker to use 2MB page size

Binutils 2.31 will enable -z separate-code by default for x86 to avoid
mixing code pages with data to improve cache performance as well as
security.  To reduce x86-64 executable and shared object sizes, the
maximum page size is reduced from 2MB to 4KB.  But x86-64 kernel must
be aligned to 2MB.  Pass -z max-page-size=0x20 to linker to force
2MB page size regardless of the default page size used by linker.

Tested with Linux kernel 4.15.6 on x86-64.

Signed-off-by: H.J. Lu 
Cc: Andy Shevchenko 
Cc: Eric Biederman 
Cc: H. Peter Anvin 
Cc: Juergen Gross 
Cc: Kees Cook 
Cc: Kirill A. Shutemov 
Cc: Linus Torvalds 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Link:
http://lkml.kernel.org/r/came9rop4_%3d_8twdptyap2dhonoceatosnijloppzhonptl8...@mail.gmail.com
Signed-off-by: Ingo Molnar 

-- 
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/22948] Modify ld search path to match libxxx.lib

2018-03-20 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22948

Nick Clifton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-03-20
 CC||nickc at redhat dot com
   Assignee|unassigned at sourceware dot org   |nickc at redhat dot com
 Ever confirmed|0   |1

--- Comment #1 from Nick Clifton  ---
Created attachment 10904
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10904&action=edit
Proposed patch

Hi Ryan,

  Please could you try out this patch and let me know if it does what you want
?

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/22966] n64 MIPS: -mplt -msym32 is resulting in assertion ld.orig: BFD 2.29.1 assertion fail binutils-2.29.1 /bfd/elfxx-mips.c:11234

2018-03-20 Thread ma...@linux-mips.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22966

Maciej W. Rozycki  changed:

   What|Removed |Added

 Target||mips*-*-*
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-03-20
  Component|binutils|ld
 CC||ma...@linux-mips.org
   Assignee|unassigned at sourceware dot org   |ma...@linux-mips.org
 Ever confirmed|0   |1
Summary|MIPS -mplt -msym32 is   |n64 MIPS: -mplt -msym32 is
   |resulting in assertion  |resulting in assertion
   |ld.orig: BFD 2.29.1 |ld.orig: BFD 2.29.1
   |assertion fail  |assertion fail
   |binutils-2.29.1 |binutils-2.29.1
   |/bfd/elfxx-mips.c:11234 |/bfd/elfxx-mips.c:11234

--- Comment #1 from Maciej W. Rozycki  ---
Thank you for your bug report.

Linking an n64 `-msym32'/`-mplt' executable is currently not properly
supported due to a 64-bit mapping address being used by the linker by
default with n64 links.  A solution has been discussed before:
, however it
will require an ABI update and some effort to implement and is likely
not going to happen soon.

Meanwhile if you do require this combination of options to work, then as
a workaround I suggest using a linker option to override the default
mapping with a 32-bit address, e.g. `-Ttext-segment=0x40' (picking
the address used with the o32 ABI), or `-Wl,-Ttext-segment=0x40' if
passed through the GCC driver.

I'll keep this bug open for tracking purposes, as the issue hasn't been
properly recorded previously, and in the interim I will look into
converting the assertion into a proper user-comprehensible error message.

Does it help?  Let me know if you have any questions or comments.

-- 
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 gas/22988] New: aarch64 sve invalid addressing mode

2018-03-20 Thread rth at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22988

Bug ID: 22988
   Summary: aarch64 sve invalid addressing mode
   Product: binutils
   Version: 2.29
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: rth at gcc dot gnu.org
  Target Milestone: ---

.arch   armv8-a+sve
ldff1b  z0.b, p1/z, [x0]

z.s: Assembler messages:
z.s:2: Error: invalid addressing mode at operand 3 -- `ldff1b z0.b,p1/z,[x0]'

According to the ARM ARM, this is supposed to be encoded as [x0, xzr].

-- 
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 gas/22988] aarch64 sve invalid addressing mode

2018-03-20 Thread rth at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22988

Richard Henderson  changed:

   What|Removed |Added

 Target||aarch64

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