Bug 14948 - GOLD should support ordering sections as ld does with option '--sort-section'
Summary: GOLD should support ordering sections as ld does with option '--sort-section'
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 10:48 UTC by Serge Pavlov
Modified: 2013-06-06 14:14 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Test case (978 bytes, application/octet-stream)
2013-01-16 04:38 UTC, Serge Pavlov
Details
Test case (973 bytes, application/octet-stream)
2013-02-01 08:37 UTC, Serge Pavlov
Details
Test case (data sections) (974 bytes, application/octet-stream)
2013-02-01 08:42 UTC, Serge Pavlov
Details

Note You need to log in before you can comment on or make changes to this bug.
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