[Bug gold/19244] New: Gold makes stdout local with version script

2015-11-13 Thread ferdinandw+bugs at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19244

Bug ID: 19244
   Summary: Gold makes stdout local with version script
   Product: binutils
   Version: 2.27 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: ferdinandw+bugs at gmail dot com
CC: ian at airs dot com
  Target Milestone: ---

Building mplayer with current gold, it segfaults on start.
The reason was this version script:

= = = = = = = = =

MPLAYER_1 {
  # to support glibcs abhorrent backwards-compatibility hack
  global: _IO_stdin_used;
  local: *;
};

= = = = = = = = =

Which resulted in this:

$ readelf --syms --use-dynamic mplayer

Symbol table of `.gnu.hash' for image:
  Num Buc:Value  Size   Type   Bind Vis  Ndx Name
  631   1:  0 OBJECT  GLOBAL DEFAULT ABS MPLAYER_1



Now ld.bfd doesn't do this, and it's a regression, which I narrowed down
to the fix for PR gold/18548
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=5417c94d1a944d1a27f99240e5d62a6d7cd324f1
Because this is the result after reverting that patch:


$ readelf --syms --use-dynamic mplayer

Symbol table of `.gnu.hash' for image:
  Num Buc:Value  Size   Type   Bind Vis  Ndx Name
  628   0: 015ac8c0 8 OBJECT  GLOBAL DEFAULT  29 stdout
  629   0: 015ac998 0 NOTYPE  GLOBAL DEFAULT ABS _end
  630   0: 00fc7450 0 NOTYPE  GLOBAL DEFAULT ABS _edata
  631   0:  0 OBJECT  GLOBAL DEFAULT ABS MPLAYER_1
  632   1: 015ac8e0 8 OBJECT  GLOBAL DEFAULT  29 stderr
  633   1: 015ac900   152 OBJECT  GLOBAL DEFAULT  29
vpx_codec_vp8_dx_algo
  634   1: 00fc7450 0 NOTYPE  GLOBAL DEFAULT ABS __bss_start



And here is the result of ld.bfd, the result that the patch presumably meant to
generate:

$ readelf --syms --use-dynamic mplayer

Symbol table of `.gnu.hash' for image:
  Num Buc:Value  Size   Type   Bind Vis  Ndx Name
  629   0: 011c34a0 8 OBJECT  GLOBAL DEFAULT  28 stdout
  630   0:  0 OBJECT  GLOBAL DEFAULT ABS MPLAYER_1
  631   1: 011c34c0   152 OBJECT  GLOBAL DEFAULT  28
vpx_codec_vp8_dx_algo
  632   1: 011c3560 8 OBJECT  GLOBAL DEFAULT  28 stderr


Workaround with gold is to add stdout and stderr to global in the version
script.

-- 
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/19246] New: undefined reference to `dgettext'

2015-11-13 Thread sfisher at panix dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19246

Bug ID: 19246
   Summary: undefined reference to `dgettext'
   Product: binutils
   Version: 2.27 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: sfisher at panix dot com
  Target Milestone: ---

When building binutils (or just the "all-gas" target) checked out from Git, I
get the following errors.  I'm building with gmake (GNU make 4.1) on
NetBSD/i386 6.1.5.

gcc: unrecognized option '-static-libstdc++'
../bfd/.libs/libbfd.a(bfd.o): In function `bfd_errmsg':
/net/u/6/s/sfisher/binutils-gdb/bfd/bfd.c:557: undefined reference to
`dgettext'
/net/u/6/s/sfisher/binutils-gdb/bfd/bfd.c:543: undefined reference to
`dgettext'
../bfd/.libs/libbfd.a(bfd.o): In function `bfd_assert':
/net/u/6/s/sfisher/binutils-gdb/bfd/bfd.c:1081: undefined reference to
`dgettext'
../bfd/.libs/libbfd.a(bfd.o): In function `_bfd_abort':
/net/u/6/s/sfisher/binutils-gdb/bfd/bfd.c:1093: undefined reference to
`dgettext'
/net/u/6/s/sfisher/binutils-gdb/bfd/bfd.c:1099: undefined reference to
`dgettext'
../bfd/.libs/libbfd.a(bfd.o):/net/u/6/s/sfisher/binutils-gdb/bfd/bfd.c:1097:
more undefined references to `dgettext' follow
Makefile:769: recipe for target 'as-new' failed

-- 
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/19246] undefined reference to `dgettext'

2015-11-13 Thread sfisher at panix dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19246

--- Comment #1 from Stephen Fisher  ---
Passing --disable-nls to the top-level configure script does allow the build to
finish.  I wouldn't expect a problem though because this host does have
dgettext according to the man pages.

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