[Bug ld/13391] .rofixup section size mismatch

2018-01-16 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=13391

--- Comment #22 from Nick Clifton  ---
Hi Waldemar,

> It is getting better, the testcase works, the uClibc utils are compilable,
> but compilation of busybox fails now.

*sigh*.  OK, I will take a look, but it may not be for a little while
as I am busy with the 2.30 release at the moment.

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


Re: Translatable strings not marked 'c-format'

2018-01-16 Thread Nick Clifton
Hi Ask,

> Should I ask the translators for each language to individually submit
> the updates to their language?

Yes please.

> I assume the fixes should be applied to both the old and the new
> version.  Correct?

Correct - thanks very much.

Cheers
  Nick


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


[Bug gold/22042] gold: --help output translation header unexpectedly

2018-01-16 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22042

--- Comment #4 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_30-branch branch has been updated by Cary Coutant
:

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

commit 75400e01f206ad383ab15a40e13086c2f9cc795b
Author: Cary Coutant 
Date:   Mon Jan 15 10:05:54 2018 -0800

Fix -fuse-ld option to accept string argument.

PR 22042 complained that garbage text was being printed in the help
for the -fuse-ld option; this was caused by passing an empty string
to the gettext() function, which sometimes returns garbage when passed
an empty string. The quick fix was to replace "" with NULL as the helparg,
but that changed the parsing of the option, as gold uses the helparg to
determine whether an option takes an argument. This patch adds a
non-empty helparg string to fix both problems.

gold/
PR gold/22694
* options.h (-fuse-ld): Add correct helparg.

-- 
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 gold/22694] [2.30 Regression] -fuse-ld=gold not recognized

2018-01-16 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22694

--- Comment #9 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_30-branch branch has been updated by Cary Coutant
:

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

commit 75400e01f206ad383ab15a40e13086c2f9cc795b
Author: Cary Coutant 
Date:   Mon Jan 15 10:05:54 2018 -0800

Fix -fuse-ld option to accept string argument.

PR 22042 complained that garbage text was being printed in the help
for the -fuse-ld option; this was caused by passing an empty string
to the gettext() function, which sometimes returns garbage when passed
an empty string. The quick fix was to replace "" with NULL as the helparg,
but that changed the parsing of the option, as gold uses the helparg to
determine whether an option takes an argument. This patch adds a
non-empty helparg string to fix both problems.

gold/
PR gold/22694
* options.h (-fuse-ld): Add correct helparg.

-- 
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/22717] New: String concatenation impossible to translate in bfd

2018-01-16 Thread fmarchal at perso dot be
https://sourceware.org/bugzilla/show_bug.cgi?id=22717

Bug ID: 22717
   Summary: String concatenation impossible to translate in bfd
   Product: binutils
   Version: 2.30
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: fmarchal at perso dot be
  Target Milestone: ---

In elf64-x86-64.c, at line 1404
(https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/elf64-x86-64.c;h=ba4f47bff469e829f5ffdc95ded6bf1061b2d24a;hb=HEAD#l1404),
the message contains several %s that are replaced with translated words:

  _bfd_error_handler (_("%B: relocation %s against %s%s`%s' can "
"not be used when making %s%s"),
  input_bfd, howto->name, und, v, name,
  object, pic);

Constructing a message like this is impossible to translate correctly into
French (and probably other languages).

The usual solution is to swap format arguments like this in the translated
message: %2$s%1$s. But that syntax isn't supported by _bfd_doprnt.

Is it possible to add printf positional arguments to _bfd_doprnt?

The alternative would be to hard code every possible message such as in:

static bfd_boolean
elf_x86_64_need_pic (struct bfd_link_info *info,
 bfd *input_bfd, asection *sec,
 struct elf_link_hash_entry *h,
 Elf_Internal_Shdr *symtab_hdr,
 Elf_Internal_Sym *isym,
 reloc_howto_type *howto)
{ 
  int v = 0;
  int und = 0;
  int pic = 0;
  int object = 0;

  const char *name;
  if (h)
{ 
  name = h->root.root.string;
  switch (ELF_ST_VISIBILITY (h->other))
{
case STV_HIDDEN:
  v = 0x01;
  break;
case STV_INTERNAL:
  v = 0x02;
  break;
case STV_PROTECTED:
  v = 0x03;
  break;
default:
  if (((struct elf_x86_link_hash_entry *) h)->def_protected)
v = 0x04;
  else
v = 0x05;
  pic = 0x08;
  break;
}

  if (!h->def_regular && !h->def_dynamic)
und = 0x20;
}
  else
{ 
  name = bfd_elf_sym_name (input_bfd, symtab_hdr, isym, NULL);
  pic = 0x10;
}

  if (bfd_link_dll (info))
object = 0x40;
  else if (bfd_link_pie (info))
object = 0x80;
  else
object = 0xC0;

switch (v | pic | und | object)
{
case 0x41:
  /* xgettext:c-format */
  _bfd_error_handler (_("%B: relocation %s against hidden symbol `%s' can "
"not be used when making a shared object"),
  input_bfd, howto->name, name);
  break;
case 0x61:
  /* xgettext:c-format */
  _bfd_error_handler (_("%B: relocation %s against undefined hidden symbol `%s'
can "
"not be used when making a shared object"),
  input_bfd, howto->name, name,);
  break;
/*
Still 31 cases to add...
*/
}
  bfd_set_error (bfd_error_bad_value);
  sec->check_relocs_failed = 1;
  return FALSE;
}

Not fun but maybe easier than adding positional arguments to _bfd_doprnt.

-- 
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 gold/19278] load segment created outside memory section specified in linker script

2018-01-16 Thread stefan.bru...@rwth-aachen.de
https://sourceware.org/bugzilla/show_bug.cgi?id=19278

Stefan Brüns  changed:

   What|Removed |Added

 CC||stefan.bruens@rwth-aachen.d
   ||e

--- Comment #1 from Stefan Brüns  ---
The mapfile contains the following:

Memory map
 ** file header
0x07fff000   0x34
 ** segment headers
0x07fff034   0xa0
.text   0x0800 0x1b78 load address 0x800 

i.e. it seems like it prepends the file and segment headers.

This probably is also the reason for the "address of section '' moves
backward" error message, e.g.:

gold: error: address of section '.rodata' moves backward from 0x8001b9c to
0x8001b78
.note.gnu.build-id
0x08001b78   0x24
 ** note header
0x08001b78   0x10
 ** zero fill   0x08001b88   0x14
.rodata 0x08001b78  0x144

Note, the build-id is an orphan section here.

-- 
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/22717] String concatenation impossible to translate in bfd

2018-01-16 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22717

Alan Modra  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #1 from Alan Modra  ---
> The usual solution is to swap format arguments like this in the translated
> message: %2$s%1$s. But that syntax isn't supported by _bfd_doprnt.

It does as of 2017-11-05.  Try it!

-- 
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 gold/19278] load segment created outside memory section specified in linker script

2018-01-16 Thread stefan.bru...@rwth-aachen.de
https://sourceware.org/bugzilla/show_bug.cgi?id=19278

--- Comment #2 from Stefan Brüns  ---
found a way to suppress at least the "outside of any MEMORY region"
error/warning:

---
PHDRS { 
  hdr PT_PHDR FILEHDR PHDRS;
  note PT_NOTE;
  text PT_LOAD;
  data PT_LOAD;
}

SECTIONS {
  .text : { 
  } >rom :text

  ...
  .data : {
  } >ram AT >rom :data
}
---

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