[Bug binutils/20722] New: Unrecognized storage class error when building dlls with --gc-sections

2016-10-20 Thread lukeallardyce at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20722

Bug ID: 20722
   Summary: Unrecognized storage class error when building dlls
with --gc-sections
   Product: binutils
   Version: 2.28 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: lukeallardyce at gmail dot com
  Target Milestone: ---

Created attachment 9584
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9584&action=edit
coffcode.h patch

Commit 2b80414 causes an error when using binutils with dlls with C_HIDDEN
symbols (generated when using --gc-sections), which along with C_EXTLAB was
previously not considered "unknown". 

I got things working again by reverting the change, at least for C_HIDDEN.
Patch attached.

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


Re: Translatable strings not marked 'c-format'

2016-10-20 Thread Nick Clifton
Hi Ask,

> Do you know when the translation
> templates on translationproject.org will be updated?

On translationproject.org - no.  But I have just updated the
bfd.pot template in the binutils source repository (which I
forgot to do yesterday, sorry).

Cheers
  Nick


___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


Re: Translatable strings not marked 'c-format'

2016-10-20 Thread Ask Hjorth Larsen
Hi Nick

I just tested a message like this:

#: coff-sh.c:2780 cofflink.c:2964
#, c-format
msgid "%B: illegal symbol index %ld in relocs"
msgstr "%A: advarsel: illegalt symbolindeks %ld i relokeringerne"

Note how the translation contains an erroneous %A instead of the correct %B.

This is accepted by msgfmt.  Thus, the c-format flag cannot validate
these codes.  It also accepts the message if %A or %B is omitted.

The reason why msgfmt does not recognize them is that the %A/%B codes
are defined by the error handler (bfd.c around line 600).   Meanwhile,
msgfmt is only aware of the codes of printf.

I see "/* Invoking %A with a null section pointer is an internal
error.  */", followed by abort(), which means that superficially valid
translation files can very easily result in abort() or possibly buffer
overruns.

My recommendation is to use the same string codes as printf.  Then
faulty translations will be rejected by translationproject.

I wrote a script to verify existing translations on the web page, and
those that I tested had at least a few errors each.

Best regards
Ask


2016-10-20 12:47 GMT+02:00 Nick Clifton :
> Hi Ask,
>
>> Do you know when the translation
>> templates on translationproject.org will be updated?
>
> On translationproject.org - no.  But I have just updated the
> bfd.pot template in the binutils source repository (which I
> forgot to do yesterday, sorry).
>
> Cheers
>   Nick
>

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


Re: Translatable strings not marked 'c-format'

2016-10-20 Thread Ask Hjorth Larsen
This is the number of errors I find:

Summary
===
da.po: 0 warnings / 1480 messages
es.po: 1 warnings / 1461 messages
fi.po: 1 warnings / 1478 messages
fr.po: 2 warnings / 1347 messages
id.po: 0 warnings / 880 messages
ja.po: 2 warnings / 1017 messages
ro.po: 0 warnings / 605 messages
ru.po: 2 warnings / 1347 messages
rw.po: 0 warnings / 2 messages
sr.po: 0 warnings / 1457 messages
sv.po: 0 warnings / 1400 messages
tr.po: 0 warnings / 646 messages
uk.po: 5 warnings / 1314 messages
vi.po: 3 warnings / 1342 messages
zh_CN.po: 0 warnings / 215 messages

However I don't know if the test logic is sufficient to detect all errors.

http://dcwww.camd.dtu.dk/~askhl/files/warnings.txt
http://dcwww.camd.dtu.dk/~askhl/files/bfd-stringcheck.py (requires pyg3t)

Best regards
Ask


2016-10-20 16:34 GMT+02:00 Ask Hjorth Larsen :
> Hi Nick
>
> I just tested a message like this:
>
> #: coff-sh.c:2780 cofflink.c:2964
> #, c-format
> msgid "%B: illegal symbol index %ld in relocs"
> msgstr "%A: advarsel: illegalt symbolindeks %ld i relokeringerne"
>
> Note how the translation contains an erroneous %A instead of the correct %B.
>
> This is accepted by msgfmt.  Thus, the c-format flag cannot validate
> these codes.  It also accepts the message if %A or %B is omitted.
>
> The reason why msgfmt does not recognize them is that the %A/%B codes
> are defined by the error handler (bfd.c around line 600).   Meanwhile,
> msgfmt is only aware of the codes of printf.
>
> I see "/* Invoking %A with a null section pointer is an internal
> error.  */", followed by abort(), which means that superficially valid
> translation files can very easily result in abort() or possibly buffer
> overruns.
>
> My recommendation is to use the same string codes as printf.  Then
> faulty translations will be rejected by translationproject.
>
> I wrote a script to verify existing translations on the web page, and
> those that I tested had at least a few errors each.
>
> Best regards
> Ask
>
>
> 2016-10-20 12:47 GMT+02:00 Nick Clifton :
>> Hi Ask,
>>
>>> Do you know when the translation
>>> templates on translationproject.org will be updated?
>>
>> On translationproject.org - no.  But I have just updated the
>> bfd.pot template in the binutils source repository (which I
>> forgot to do yesterday, sorry).
>>
>> Cheers
>>   Nick
>>

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/20705] [libopcodes][x86] VEX masking register name lacks formatting, cannot assemble

2016-10-20 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20705

--- Comment #1 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=9889cbb14ebea4b281408afcfd94ad6646ab370a

commit 9889cbb14ebea4b281408afcfd94ad6646ab370a
Author: H.J. Lu 
Date:   Thu Oct 20 15:07:42 2016 -0700

Check invalid mask registers

In 32-bit, the REX_B bit in the 3-byte VEX prefix is ignored and the
the highest bit in VEX. is either 1 or ignored.  In 64-bit, we
need to check invalid mask registers.

gas/

PR binutis/20705
* testsuite/gas/i386/i386.exp: Run x86-64-opcode-bad.
* testsuite/gas/i386/x86-64-opcode-bad.d: New file.
* testsuite/gas/i386/x86-64-opcode-bad.s: Likewise.

opcodes/

PR binutis/20705
* i386-dis.c (get_valid_dis386): Ignore the REX_B bit and
the highest bit in VEX. for the 3-byte VEX prefix in
32-bit mode.  Don't check vex.register_specifier in 32-bit
mode.
(OP_E_register): Check invalid mask registers.
(OP_G): Likewise.
(OP_VEX): 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 binutils/20705] [libopcodes][x86] VEX masking register name lacks formatting, cannot assemble

2016-10-20 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20705

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||hjl.tools at gmail dot com
 Resolution|--- |FIXED
   Target Milestone|--- |2.28

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