rustwasm / team

A point of coordination for all things Rust and WebAssembly
MIT License
1.45k stars 59 forks source link

Dynamic linking experiments are stumbled by unconditional "--export-table" #251

Closed pepyakin closed 5 years ago

pepyakin commented 5 years ago

I've discovered flags like --pic/--shared in the latest LLD (seems to be not yet available in the LLD shipped with rust). But when I try to use them I'm getting this LLD error:

lld: error: -shared/-pie is incompatible with --export-table

I tried to pass --import-table to override the rustc passed --export-table, however, LLD doesn't support that, and fails with

lld: error: --import-table and --export-table may not be used together

Do you have any idea how to proceed here?

alexcrichton commented 5 years ago

There's a bit of discussion on the original PR, and it seems like if LLD doesn't support both flags then we should remove the argument from rustc and require users to pass in an explicit value.

cc @overdrivenpotato

pepyakin commented 5 years ago

Oh, the problem might be deeper, since overriding of stack size doesn't seem to work either.

alexcrichton commented 5 years ago

I believe the stack size aspect was addressed by https://github.com/rust-lang/rust/pull/57337

alexcrichton commented 5 years ago

Should have been fixed in https://github.com/rust-lang/rust/pull/57861, so closing.