1
1
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:
Rui Ueyama 2021-03-23 15:25:10 +09:00
parent 4485de811a
commit c4b61dd1f5

View File

@ -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";
}