Add rts/Linker support for more than 64k sections

Authored by olsner on Oct 23 2015, 1:57 AM.



Since some ELF fields ran out of range to represent that many sections,
they've been extended with magic numbers that indicate that the full
value is stored in another field.

This will be necessary for GHCi with -split-sections on ELF platforms that
don't use GNU ld.

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
olsner updated this revision to Diff 4610.Oct 23 2015, 1:57 AM
olsner retitled this revision from to Add rts/Linker support for more than 64k sections.
olsner updated this object.
olsner edited the test plan for this revision. (Show Details)
olsner added a reviewer: simonmar.
olsner updated the Trac tickets for this revision.
bgamari requested changes to this revision.Oct 25 2015, 8:38 AM
bgamari edited edge metadata.

Where are these magic numbers documented? I've looked through the ELF 1.2 specification and haven't found any reference to this. Could you add a short Note with a reference to the relevant specification?

This revision now requires changes to proceed.Oct 25 2015, 8:38 AM
olsner updated this revision to Diff 4693.Oct 27 2015, 4:09 AM
olsner edited edge metadata.
  • Add a Note [Many ELF Sections]
bgamari accepted this revision.Oct 27 2015, 4:57 AM
bgamari edited edge metadata.

Thanks for the note! I learned something today.

simonmar accepted this revision.Oct 28 2015, 7:45 PM
simonmar edited edge metadata.

haven't reviewed this in detail, but it looks plausible and there are good Notes. Happy for this to go in.

@erikd, how does this look to you?

erikd added a comment.Oct 31 2015, 7:11 PM

Code looks good.

Building on PowerPC now. Should be done building and testing in about 2 hours.

erikd accepted this revision.Oct 31 2015, 7:49 PM
erikd edited edge metadata.

Built and tested on PowerPC. Lets land this!

This revision is now accepted and ready to land.Oct 31 2015, 7:49 PM
This revision was automatically updated to reflect the committed changes.