aboutsummaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2017-10-20 11:00:28 -0700
committerSriraman Tallam <tmsriram@google.com>2017-10-20 11:00:28 -0700
commit3b4190ccb31be262a5aac78238e6d659746f1f0f (patch)
tree462cab8fff8edfd52d66b6e46e73620c88ea1ea7 /gold/options.h
parentf3012016f008030b48597b578a5fb1e550907374 (diff)
downloadgdb-3b4190ccb31be262a5aac78238e6d659746f1f0f.zip
gdb-3b4190ccb31be262a5aac78238e6d659746f1f0f.tar.gz
gdb-3b4190ccb31be262a5aac78238e6d659746f1f0f.tar.bz2
New gold linker option -z,text-unlikely-segment.
2017-10-04 Sriraman Tallam <tmsriram@google.com> * options.h (-z,text_unlikely_segment): New option. * layout.cc (Layout::layout): Create new output section for .text.unlikely sections with the new option. (Layout::segment_precedes): Check for the new option when segment flags match. * testsuite/text_unlikely_segment.cc: New test source. * testsuite/text_unlikely_segment.sh: New test script. * testsuite/Makefile.am (text_unlikely_segment): New test. * testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h
index 678ca82..2a43e8d 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1492,6 +1492,11 @@ class General_options
DEFINE_bool_alias(textoff, text, options::DASH_Z, '\0',
N_("Permit relocations in read-only segments"),
NULL, true);
+ DEFINE_bool(text_unlikely_segment, options::DASH_Z, '\0', false,
+ N_("Move .text.unlikely sections to a separate segment."),
+ N_("Do not move .text.unlikely sections to a separate "
+ "segment."));
+
public:
typedef options::Dir_list Dir_list;