The title says almost everything. As a side note, this is needed, among others by the FreeBSD kernel linker script.
Details
Diff Detail
Event Timeline
lib/Driver/GnuLdDriver.cpp | ||
---|---|---|
293–295 | 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 | 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 | phabricator often has trouble rendering whitespace properly, but please double-check tabs vs spaces here |
LGTM.
include/lld/ReaderWriter/ELFLinkingContext.h | ||
---|---|---|
272 | Don't make a function virtual if not needed. | |
unittests/DriverTests/GnuLdDriverTest.cpp | ||
184 | 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. |
Don't make a function virtual if not needed.