mirror of
https://github.com/rui314/mold.git
synced 2024-12-27 10:23:41 +03:00
Add error checks
This commit is contained in:
parent
4485de811a
commit
c4b61dd1f5
@ -438,6 +438,13 @@ void parse_nonpositional_args(std::span<std::string_view> args,
|
||||
if (config.pic)
|
||||
config.image_base = 0;
|
||||
|
||||
if (!config.shared) {
|
||||
if (!config.filter.empty())
|
||||
Fatal() << "-filter may not be used without -shared";
|
||||
if (!config.auxiliary.empty())
|
||||
Fatal() << "-auxiliary may not be used without -shared";
|
||||
}
|
||||
|
||||
if (config.output == "")
|
||||
Fatal() << "-o option is missing";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user