Bug 27834 - ld: Add -Bno-symbolic to cancel -Bsymbolic/-Bsymbolic-functions
Summary: ld: Add -Bno-symbolic to cancel -Bsymbolic/-Bsymbolic-functions
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Fangrui Song
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-09 00:34 UTC by Fangrui Song
Modified: 2021-05-15 04:48 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed: 2021-05-13 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 cvs-commit@gcc.gnu.org 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 cvs-commit@gcc.gnu.org 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 cvs-commit@gcc.gnu.org 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_.