mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
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.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2021-05-04 Fangrui Song <maskray@google.com>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
2021-03-30 Alan Modra <amodra@gmail.com>
|
2021-03-30 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR gold/27625
|
PR gold/27625
|
||||||
|
@ -340,6 +340,27 @@ General_options::parse_V(const char*, const char*, Command_line*)
|
|||||||
printf(" %s\n", *p);
|
printf(" %s\n", *p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
General_options::parse_Bno_symbolic(const char*, const char*,
|
||||||
|
Command_line*)
|
||||||
|
{
|
||||||
|
this->bsymbolic_ = BSYMBOLIC_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
General_options::parse_Bsymbolic_functions(const char*, const char*,
|
||||||
|
Command_line*)
|
||||||
|
{
|
||||||
|
this->bsymbolic_ = BSYMBOLIC_FUNCTIONS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
General_options::parse_Bsymbolic(const char*, const char*,
|
||||||
|
Command_line*)
|
||||||
|
{
|
||||||
|
this->bsymbolic_ = BSYMBOLIC_ALL;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
General_options::parse_defsym(const char*, const char* arg,
|
General_options::parse_defsym(const char*, const char* arg,
|
||||||
Command_line* cmdline)
|
Command_line* cmdline)
|
||||||
|
@ -747,11 +747,20 @@ class General_options
|
|||||||
DEFINE_bool(Bshareable, options::ONE_DASH, '\0', false,
|
DEFINE_bool(Bshareable, options::ONE_DASH, '\0', false,
|
||||||
N_("Generate shared library (alias for -G/-shared)"), NULL);
|
N_("Generate shared library (alias for -G/-shared)"), NULL);
|
||||||
|
|
||||||
DEFINE_bool(Bsymbolic, options::ONE_DASH, '\0', false,
|
DEFINE_special (Bno_symbolic, options::ONE_DASH, '\0',
|
||||||
N_("Bind defined symbols locally"), NULL);
|
N_ ("Don't bind default visibility defined symbols locally "
|
||||||
|
"for -shared (default)"),
|
||||||
|
NULL);
|
||||||
|
|
||||||
DEFINE_bool(Bsymbolic_functions, options::ONE_DASH, '\0', false,
|
DEFINE_special (Bsymbolic_functions, options::ONE_DASH, '\0',
|
||||||
N_("Bind defined function symbols locally"), NULL);
|
N_ ("Bind default visibility defined function symbols "
|
||||||
|
"locally for -shared"),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
DEFINE_special (
|
||||||
|
Bsymbolic, options::ONE_DASH, '\0',
|
||||||
|
N_ ("Bind default visibility defined symbols locally for -shared"),
|
||||||
|
NULL);
|
||||||
|
|
||||||
// c
|
// c
|
||||||
|
|
||||||
@ -1740,6 +1749,21 @@ class General_options
|
|||||||
endianness() const
|
endianness() const
|
||||||
{ return this->endianness_; }
|
{ return this->endianness_; }
|
||||||
|
|
||||||
|
enum Bsymbolic_kind
|
||||||
|
{
|
||||||
|
BSYMBOLIC_NONE,
|
||||||
|
BSYMBOLIC_FUNCTIONS,
|
||||||
|
BSYMBOLIC_ALL,
|
||||||
|
};
|
||||||
|
|
||||||
|
bool
|
||||||
|
Bsymbolic() const
|
||||||
|
{ return this->bsymbolic_ == BSYMBOLIC_ALL; }
|
||||||
|
|
||||||
|
bool
|
||||||
|
Bsymbolic_functions() const
|
||||||
|
{ return this->bsymbolic_ == BSYMBOLIC_FUNCTIONS; }
|
||||||
|
|
||||||
bool
|
bool
|
||||||
discard_all() const
|
discard_all() const
|
||||||
{ return this->discard_locals_ == DISCARD_ALL; }
|
{ return this->discard_locals_ == DISCARD_ALL; }
|
||||||
@ -1873,6 +1897,8 @@ class General_options
|
|||||||
void
|
void
|
||||||
copy_from_posdep_options(const Position_dependent_options&);
|
copy_from_posdep_options(const Position_dependent_options&);
|
||||||
|
|
||||||
|
// Whether we bind default visibility defined symbols locally for -shared.
|
||||||
|
Bsymbolic_kind bsymbolic_;
|
||||||
// Whether we printed version information.
|
// Whether we printed version information.
|
||||||
bool printed_version_;
|
bool printed_version_;
|
||||||
// Whether to mark the stack as executable.
|
// Whether to mark the stack as executable.
|
||||||
|
Reference in New Issue
Block a user