This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi,
This patch adds an option to gold to create a new ELF segment for
code determined unlikely by the compiler. Currently, this can be done
with a linker plugin but I was wondering if it is fine to have this
support in gold with an option for ease of use.
The advantages of doing this are:
* We could only map the hot segment to huge pages to keep iTLB misses low
* We could munlock the unlikely segment
Is this alright?
ChangeLog entry:
* options.h (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.
Patch attached.
Thanks
Sri
Attachment:
segment_split.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |