[Bug binutils/21212] New: Improve "Empty loadable segment detected" warning

2017-03-02 Thread binutils at ineranves dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=21212

Bug ID: 21212
   Summary: Improve "Empty loadable segment detected" warning
   Product: binutils
   Version: 2.29 (HEAD)
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: binutils at ineranves dot de
  Target Milestone: ---

Created attachment 9868
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9868&action=edit
git patch

This warning is currently shown (among other situations) when a segment has
p_filesz = 0 and a p_memsz > 0 , which is a valid setup to initialize flash
memory of embedded systems with zeros and explicitly mentioned in the ELF
specification as a valid use case.
The attached patch limits the warning to situations when p_filesz > 0 - which
happens when a segment is truncated to 0 length by an objcopy operation that
removes all of the segment's sections.

When the warning is shown, it should identify the segment it is talking about.
The attached patch includes the p_vaddr of the segment for that purpose.

-- 
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/21212] Improve "Empty loadable segment detected" warning

2017-03-02 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21212

--- Comment #1 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

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

commit f98450c6eee6878ebf5b052d231758026d250427
Author: Nick Clifton 
Date:   Thu Mar 2 14:47:29 2017 +

Disable warning message about a program header with no associated sections
when that header's file size is non-zero.

PR ld/21212
* elf.c (rewrite_elf_program_header): Do not issue a warning for
empty segments which have a non-zero filesz.

-- 
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/21212] Improve "Empty loadable segment detected" warning

2017-03-02 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21212

Nick Clifton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||nickc at redhat dot com
 Resolution|--- |FIXED

--- Comment #2 from Nick Clifton  ---
Hi Martin,

  Thanks for the bug report and patch.  I have applied your patch with one
  small change - the warning will still be issued if the p_filesz field is
  zero *and* p_memsz is zero.  I hope that this is OK with you.

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 binutils/21212] Improve "Empty loadable segment detected" warning

2017-03-02 Thread binutils at ineranves dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=21212

--- Comment #3 from Martin Bickel  ---
Hi Nick,

your updated change is ok - I don't see any value in having segments with
memsz==0 , so a warning makes sense.

However, your commit message and Changelog entry is the wrong way round: the
warning is disabled when filesz is zero and *memsz* is nonzero.



Here is the behavior:

filesz | memsz | original code | Martin's patch | Nick's patch
--
  0   0  warn don't warn   warn
  0 > 0  warn don't warn   don't warn
> 0 > 0  warn warn warn
> 0   0  warn warn warn

The last line shouldn't be relevant as it's illegal in ELF.

-- 
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/12969] ld silently generates bad DLL when there are more than 65536 exports

2017-03-02 Thread afranchuk at lgsinnovations dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=12969

Alex  changed:

   What|Removed |Added

 CC||afranchuk at lgsinnovations 
dot co
   ||m

--- Comment #1 from Alex  ---
Why has this patch not been accepted? I've been bitten by the issue a number of
times.

-- 
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/20744] [PPC] Incorrect relocation for VLE-instructions

2017-03-02 Thread alfedotov at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

--- Comment #11 from Alexander Fedotov  ---
(In reply to Alan Modra from comment #9)
> Fixed those issues

Hi Alan

In ppc_elf_vle_split16():
opcode = insn & 0xf300f800;

I think correct mask is 0xfc00f800

-- 
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/20744] [PPC] Incorrect relocation for VLE-instructions

2017-03-02 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20744

--- Comment #12 from Alan Modra  ---
Re comment #10 and #11: git commit 673cff9b8b
https://sourceware.org/ml/binutils/2017-03/msg00016.html

Missed the cutoff for the 2.28 release, unfortunately.

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