The title says almost everything. As a side note, this is needed, among others by the FreeBSD kernel linker script.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Driver/GnuLdDriver.cpp | ||
---|---|---|
293–295 ↗ | (On Diff #18802) | To me this comment implies we recognize a subset of GROUP() and SEARCH_DIR(). Maybe Currently we only recognize this subset of linker script commands: |
I just committed r227341 to test the existing linker script functionality. Please add a test in the same way as my commit for this patch too.
lib/Driver/GnuLdDriver.cpp | ||
---|---|---|
276 ↗ | (On Diff #18802) | This function will never fail and it's too simple to be a separate function -- it's just one line. I'd write it in-line. |
lib/Driver/GnuLdDriver.cpp | ||
---|---|---|
290 ↗ | (On Diff #18937) | phabricator often has trouble rendering whitespace properly, but please double-check tabs vs spaces here |
LGTM.
include/lld/ReaderWriter/ELFLinkingContext.h | ||
---|---|---|
272 ↗ | (On Diff #18937) | Don't make a function virtual if not needed. |
unittests/DriverTests/GnuLdDriverTest.cpp | ||
184 ↗ | (On Diff #18937) | I think there's code in the GNU driver to add /usr/lib to the default search path, so this test may pass even if the linker script parser doesn't work. I'd make it something unrealistic, like "/foo/bar", to avoid possible conflict. |