diff options
author | Sriraman Tallam <tmsriram@google.com> | 2018-03-07 12:15:49 -0800 |
---|---|---|
committer | Sriraman Tallam <tmsriram@google.com> | 2018-03-07 12:15:49 -0800 |
commit | 779bdadbea9a62e5a2203651703e15edd321b9d6 (patch) | |
tree | fc4c05a051c3234c9b62bb571edb766ffb27207a /gold/options.h | |
parent | ea005f31ca7a823680c70a75ae073bee52487859 (diff) | |
download | gdb-779bdadbea9a62e5a2203651703e15edd321b9d6.zip gdb-779bdadbea9a62e5a2203651703e15edd321b9d6.tar.gz gdb-779bdadbea9a62e5a2203651703e15edd321b9d6.tar.bz2 |
New option -z,keep-text-section prefix.
This option does not merge certain text sections with prefixes
.text.hot, .text.unlikely, .text.startup and .text.exit.
* layout.cc (Layout::default_section_order): Check for text section
prefixes.
(Layout::text_section_name_mapping): New static member.
(Layout::text_section_name_mapping_count): New static member.
(Layout::match_section_name): New static function.
(Layout::output_section_name): Check for text section prefixes.
* layout.h (Output_section_order::ORDER_TEXT_HOT): New enum value.
(Output_section_order::ORDER_TEXT_STARTUP): New enum value.
(Output_section_order::ORDER_TEXT_EXIT): New enum value.
(Output_section_order::ORDER_TEXT_UNLIKELY): New enum value.
(Layout::text_section_name_mapping): New static member.
(Layout::text_section_name_mapping_count): New static member.
(Layout::match_section_name): New static function.
* options.h (keep_text_section_prefix): New -z option.
* testsuite/Makefile.am (keep_text_section_prefix): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/keep_text_section_prefix.cc: New test source.
* testsuite/keep_text_section_prefix.sh: New test script.
Diffstat (limited to 'gold/options.h')
-rw-r--r-- | gold/options.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h index 152b0c1..e75a8bd 100644 --- a/gold/options.h +++ b/gold/options.h @@ -1500,6 +1500,10 @@ class General_options N_("Move .text.unlikely sections to a separate segment."), N_("Do not move .text.unlikely sections to a separate " "segment.")); + DEFINE_bool(keep_text_section_prefix, options::DASH_Z, '\0', false, + N_("Keep .text.hot, .text.startup, .text.exit and .text.unlikely " + "as separate sections in the final binary."), + N_("Merge all .text.* prefix sections.")); public: |