bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: ferdinandw+bugs at gmail dot com
Subject: [Bug gold/19244] New: Gold makes stdout local with version script
Date: Fri, 13 Nov 2015 20:59:49 +0000

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: 0000000000000000     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: 00000000015ac8c0     8 OBJECT  GLOBAL DEFAULT  29 stdout
  629   0: 00000000015ac998     0 NOTYPE  GLOBAL DEFAULT ABS _end
  630   0: 0000000000fc7450     0 NOTYPE  GLOBAL DEFAULT ABS _edata
  631   0: 0000000000000000     0 OBJECT  GLOBAL DEFAULT ABS MPLAYER_1
  632   1: 00000000015ac8e0     8 OBJECT  GLOBAL DEFAULT  29 stderr
  633   1: 00000000015ac900   152 OBJECT  GLOBAL DEFAULT  29
vpx_codec_vp8_dx_algo
  634   1: 0000000000fc7450     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: 00000000011c34a0     8 OBJECT  GLOBAL DEFAULT  28 stdout
  630   0: 0000000000000000     0 OBJECT  GLOBAL DEFAULT ABS MPLAYER_1
  631   1: 00000000011c34c0   152 OBJECT  GLOBAL DEFAULT  28
vpx_codec_vp8_dx_algo
  632   1: 00000000011c3560     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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]