commit | b7e7dde32e49a00a9e6bc489c859d58472f59b26 | [log] [tgz] |
---|---|---|
author | alx32 <103613512+alx32@users.noreply.github.com> | Thu Mar 21 14:50:44 2024 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Mar 21 14:54:41 2024 -0700 |
tree | 36849f56b48f6564f87d9fd6663fc24fdb8bcd0a | |
parent | 38b549dc46d72a60ab7c3182c7b7508d1251ec27 [diff] |
[lld-macho][NFC] Refactor insertions into inputSections (#85692) Before this change, after `InputSection` objects are created, they need to be added to the appropriate container for tracking. The logic for selecting the appropriate container lives in `Driver.cpp` / `gatherInputSections`, where the `InputSection` is added to the matching container depending on the input config and the type of `InputSection`. Also, multiple other locations also insert directly into `inputSections` array - assuming that that is the appropriate container for the `InputSection`'s they create. Currently this is the correct assumption, however an upcoming feature will change this. For an upcoming feature (relative method lists), we need to route `InputSection`'s either to `inputSections` array or to a synthetic section, depending on weather the relative method list optimization is enabled or not. We can achieve the above either by duplicating some of the logic or refactoring the routing and `InputSection`'s and reusing that. The refactoring & code sharing approach seems the correct way to go - as such this diff performs the refactoring while not introducing any functional changes. Later on we can just call `addInputSection` and not have to worry about routing logic. --------- GitOrigin-RevId: b609a4d7ea8b716f5f0ec83d10945362f42e730d
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f
.