bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/18829] New: Add the ability to sort PLT entries


From: gregory.d.bentley at intel dot com
Subject: [Bug ld/18829] New: Add the ability to sort PLT entries
Date: Fri, 14 Aug 2015 17:41:01 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18829

            Bug ID: 18829
           Summary: Add the ability to sort PLT entries
           Product: binutils
           Version: 2.26 (HEAD)
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: gregory.d.bentley at intel dot com
  Target Milestone: ---

Created attachment 8524
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8524&action=edit
binutils patch to add -z sortplt

The jump instructions in the Procedure Linkage Table which effect the jump into
shared library functions are laid out in more or less random order. While one
can use a linker script to get more cache friendly layout of functions within
an executable, there is currently no way to explicitly specify the order of the
PLT entries. This means you can get into the situation where you have only 1
jump instruction (6 bytes) being "hot" on a 64 byte cache line.

The attached patch allows a user to specify a file which lists the names of hot
shared library functions. The PLT entries for those functions will be placed
into the table first, with any unspecified functions following.

The syntax is -z sortplt=<filename>

(As a side note, -z bndplt also gives more cache friendly code as it splits the
cold (first call) code from the hot (every call) code.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]