Bug 14948

Summary: GOLD should support ordering sections as ld does with option '--sort-section'
Product: binutils Reporter: Serge Pavlov <serge.v.pavlov>
Component: goldAssignee: Ian Lance Taylor <ian>
Status: RESOLVED FIXED    
Severity: enhancement CC: aivchenk, ccoutant
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: Test case
Test case
Test case (data sections)

Description Serge Pavlov 2012-12-12 10:48:45 UTC
BFD linker supports option '--sort-section=name', which allows sections like .text.hot0001, .text.hot0002 etc to be placed in target executable in alphabetical order. This option has been used by Intel compiler to make function code layout more deterministic.

This feature is important for generated code performance.
Comment 1 Serge Pavlov 2013-01-16 04:38:49 UTC
Created attachment 6821 [details]
Test case
Comment 2 Serge Pavlov 2013-02-01 08:37:08 UTC
Created attachment 6841 [details]
Test case

This test case represents another section naming, code sections have names as '.text.hot.NNNNN'.
Comment 3 Serge Pavlov 2013-02-01 08:42:19 UTC
Created attachment 6842 [details]
Test case (data sections)

A test case for data section ordering.
Comment 4 Alexander Ivchenko 2013-06-06 14:14:43 UTC
This is fixed with:

http://sourceware.org/ml/binutils/2013-05/msg00335.html