-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Support --unresolved-symbols=@<file> option in LLD for ELF #142917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,9 @@ ELF Improvements | |
on executable sections. | ||
(`#128883 <https://github.com/llvm/llvm-project/pull/128883>`_) | ||
|
||
* Added ``--unresolved-symbols=@<file>`` flag to specify path to a file with the | ||
list of unresolved symbols that will not trigger an error during lininking. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo lininking -> linking You may also want to find a more permanent place to document this. Right now it is not in the help or man-page. LLD is piggybacking on top of GNU ld's docs at https://sourceware.org/binutils/docs/ld/Options.html and that won't mention it. |
||
|
||
Breaking changes | ||
---------------- | ||
* Executable-only and readable-executable sections are now allowed to be placed | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.globl _shared | ||
_shared: | ||
callq undef@PLT | ||
callq undef2@PLT |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
undef | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New lld tests tend to favour using split-file to put all the inputs for a test in the same file. I'd also recommend having more test cases. For example an empty file, multiple symbols on separate lines. |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omit braces in this case.
ctx.arg.unresolvedSymbolsList can be a DenseSet to improve performance when the list is long.
This should only apply to
canBeExternal
symbols.Peter has a comment that you might be able to use
--defsym=bar=0
instead.I'd file a binutils feature request before rushing to add an option