This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Linkerscript: refactor sorting of special sections
AbandonedPublic

Authored by evgeny777 on Aug 5 2016, 4:42 AM.

Details

Reviewers
ruiu
rafael
Summary

Currently contents of .init_array, .fini_array, .ctors and .dtors is being sorted in Writer::finalizeSections, no matter if those sections are present in linker script or not.
This patch moves sorting of special sections to createSections(), which will allow defining symbols within such sections (required by FreeBSD and number of other projects)

Below is an example:

.init_array {
  __start = .;
  *(.init_array*)
  __end = .;
}

See this review:

https://reviews.llvm.org/D22683

Diff Detail

Event Timeline

evgeny777 updated this revision to Diff 66924.Aug 5 2016, 4:42 AM
evgeny777 retitled this revision from to [ELF] Linkerscript: refactor sorting of special sections.
evgeny777 updated this object.
evgeny777 added reviewers: ruiu, rafael.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
evgeny777 added subscribers: grimar, ikudrin, emaste and 2 others.