Bug 27834

Summary: ld: Add -Bno-symbolic to cancel -Bsymbolic/-Bsymbolic-functions
Product: binutils Reporter: Fangrui Song <i>
Component: ldAssignee: Fangrui Song <i>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed: 2021-05-13 00:00:00

Description Fangrui Song 2021-05-09 00:34:48 UTC
Depending on the workload, -Bsymbolic-functions can be a very effective optimization. -Bno-symbolic makes it easy to exclude individual shared objects which are problematic with -Bsymbolic-functions (e.g. using a direct access relocation to take the address of a function).
Comment 1 Sourceware Commits 2021-05-13 03:25:15 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit cf893b0ef7482ec11df3787772f35e820ef2592a
Author: Fangrui Song <maskray@google.com>
Date:   Tue May 11 23:10:45 2021 -0700

    ld: Add -Bno-symbolic
    
            PR 27834
            * ldlex.h (enum option_values): Add OPTION_NO_SYMBOLIC.
            * lexsup.c (ld_options): Add -Bno-symbolic.
            (parse_args): Handle -Bno-symbolic.
            * ld.texi: Document -Bno-symbolic.
            * NEWS: Mention -Bno-symbolic.
            * testsuite/ld-elf/shared.exp: Add a test.
Comment 2 Alan Modra 2021-05-13 03:32:21 UTC
Patch applied.
Comment 3 Alan Modra 2021-05-13 03:32:30 UTC
.
Comment 4 Sourceware Commits 2021-05-14 22:51:29 UTC
The master branch has been updated by Fangrui Song <maskray@sourceware.org>:

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

commit 823241a27c03235229ff0b9e12a141fc35007dec
Author: Fangrui Song <maskray@google.com>
Date:   Fri May 14 15:51:16 2021 -0700

    gold: Add -Bno-symbolic
    
    gold/
        PR 27834
        * options.h (General_options): Make -Bsymbolic and
        -Bsymbolic-functions special and adjust the help messages. Add
        enum Bsymbolic_kind and -Bno-symbolic.
        * options.cc (General_options): Define parse_Bno_symbolic,
        parse_Bsymbolic_functions, and parse_Bsymbolic.
Comment 5 Sourceware Commits 2021-05-15 04:48:58 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit 7c96e6120f1b9b5025629bbe995ca55d1be8f36f
Author: Alan Modra <amodra@gmail.com>
Date:   Sat May 15 14:13:47 2021 +0930

    [GOLD]: Re: Add -Bno-symbolic
    
            PR 27834
            * options.cc (General_options::General_options): Init bsymbolic_.