summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/linkerscript/sections-constraint.s
Commit message (Collapse)AuthorAgeFilesLines
* Order writable executable sections before writable ones.Rafael Espindola2017-05-261-1/+1
| | | | | | | | | | | | | | On SPARC, .plt is both writeable and executable. The current way sections are sorted means that lld puts it after .data/.bss. but it really needs to be close to .test to make sure branches into .plt don't overflow. I'd argue that because .bss is supposed to come last on all architectures, we should change the default sort order such that writable and executable sections come before sections that are just writeable. read-only executable sections should still come after sections that are just read-only of course. This diff makes this change. llvm-svn: 304008
* Optimize orphan placement in a general way.Rafael Espindola2017-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We used to place orphans by just using compareSectionsNonScript. Then we noticed that since linker scripts can use another order, we should first try match the section to a given PT_LOAD. But there is nothing special about PT_LOAD. The same issue can show up for PT_GNU_RELRO for example. In general, we have to search for the most similar section and put the orphan next to it. Most similar being defined as how long they follow the same code path in compareSecitonsNonScript. That is what this patch does. We now compute a rank for each output section, with a bit for each branch in what was compareSectionsNonScript. With this findOrphanPos is now fully general and orphan placement can be optimized by placing every section with the same rank at once. The included testcase is a variation of many-sections.s that uses allocatable sections to avoid the fast path in the existing code. Without threads it goes form 46 seconds to 0.9 seconds. llvm-svn: 302903
* [ELF] Heuristic for placing orphan sectionEugene Leviant2016-11-081-1/+1
| | | | | | Differential revision: https://reviews.llvm.org/D25325 llvm-svn: 286225
* Don't put ro before rx when using linker scripts.Rafael Espindola2016-09-291-1/+1
| | | | | | | | Since they end up going on the same PT_LOAD, there is no reason to sort them. This matches bfd's behaviour and is user visible in the placement of orphan sections. llvm-svn: 282799
* Make test less dependent on the section order.Rafael Espindola2016-09-201-7/+6
| | | | | | | This means either relaxing CHECKs or listing more sections and addresses in linker scripts. llvm-svn: 282014
* Make tests less dependent on the exact layout.Rafael Espindola2016-09-201-11/+11
| | | | | | | | | In most cases that means just not checking the address when we don't need it. For some tests it is easier to just set . to a known value. llvm-svn: 281976
* Remove useless file prefix.Rui Ueyama2016-09-021-0/+47
Differential Revision: https://reviews.llvm.org/D24207 llvm-svn: 280540
OpenPOWER on IntegriCloud