diff options
author | Roland McGrath <mcgrathr@google.com> | 2020-06-15 11:45:02 -0700 |
---|---|---|
committer | Roland McGrath <mcgrathr@google.com> | 2020-06-15 11:45:02 -0700 |
commit | cae64165f47b64898c4f1982d294862cfae89a47 (patch) | |
tree | d51ade829ba19bebf17822647e08d49506d534b8 /include | |
parent | 669203174311c5be76744a879563c697cd479853 (diff) | |
download | gdb-cae64165f47b64898c4f1982d294862cfae89a47.zip gdb-cae64165f47b64898c4f1982d294862cfae89a47.tar.gz gdb-cae64165f47b64898c4f1982d294862cfae89a47.tar.bz2 |
gold, ld: Implement -z start-stop-visibility=... option.
gold/
Implement -z start-stop-visibility=... option.
* options.h (class General_options): Handle -z start-stop-visibility=.
(General_options::start_stop_visibility_enum): New public method.
(General_options::set_start_stop_visibility_enum): New private method.
(General_options::start_stop_visibility_enum_): New private member.
* options.cc (General_options::General_options): Add initializer.
(General_options::finalize): Set this->start_stop_visibility_enum_
from string value.
* layout.cc (Layout::define_section_symbols): Use option setting.
bfd/
* elflink.c (bfd_elf_define_start_stop): Use start_stop_visibility
field of bfd_link_info.
include/
* bfdlink.h (struct bfd_link_info): New field start_stop_visibility.
ld/
* NEWS: Mention -z start-stop-visibility=... option for ELF.
* ld.texi (Options): Document -z start-stop-visibility=... option.
* ldmain.c (main): Initialize link_info.start_stop_visibility.
* emultempl/elf.em (gld${EMULATION_NAME}_handle_option):
Parse -z start-stop-visibility=... option.
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/bfdlink.h | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 248866c..f30e5e2 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2020-06-12 Roland McGrath <mcgrathr@google.com> + + * bfdlink.h (struct bfd_link_info): New field start_stop_visibility. + 2020-06-12 Nelson Chu <nelson.chu@sifive.com> * opcode/riscv-opc.h: Update the defined versions of CSR from diff --git a/include/bfdlink.h b/include/bfdlink.h index 34a0d2e..7163433 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -542,10 +542,10 @@ struct bfd_link_info Normally these optimizations are disabled by default but some targets prefer to enable them by default. So this field is a tri-state variable. The values are: - + zero: Enable the optimizations (either from --relax being specified on the command line or the backend's before_allocation emulation function. - + positive: The user has requested that these optimizations be disabled. (Via the --no-relax command line option). @@ -649,6 +649,9 @@ struct bfd_link_info /* May be used to set DT_FLAGS_1 for ELF. */ bfd_vma flags_1; + /* May be used to set ELF visibility for __start_* / __stop_. */ + unsigned int start_stop_visibility; + /* Start and end of RELRO region. */ bfd_vma relro_start, relro_end; |