Rollup merge of #88820 - hlopko:add_pie_relocation_model, r=petrochenkov
Add `pie` as another `relocation-model` value MCP: https://github.com/rust-lang/compiler-team/issues/461
This commit is contained in:
commit
6f1e930581
11 changed files with 147 additions and 8 deletions
|
@ -1490,9 +1490,13 @@ fn exec_linker(
|
|||
fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind {
|
||||
let kind = match (crate_type, sess.crt_static(Some(crate_type)), sess.relocation_model()) {
|
||||
(CrateType::Executable, _, _) if sess.is_wasi_reactor() => LinkOutputKind::WasiReactorExe,
|
||||
(CrateType::Executable, false, RelocModel::Pic) => LinkOutputKind::DynamicPicExe,
|
||||
(CrateType::Executable, false, RelocModel::Pic | RelocModel::Pie) => {
|
||||
LinkOutputKind::DynamicPicExe
|
||||
}
|
||||
(CrateType::Executable, false, _) => LinkOutputKind::DynamicNoPicExe,
|
||||
(CrateType::Executable, true, RelocModel::Pic) => LinkOutputKind::StaticPicExe,
|
||||
(CrateType::Executable, true, RelocModel::Pic | RelocModel::Pie) => {
|
||||
LinkOutputKind::StaticPicExe
|
||||
}
|
||||
(CrateType::Executable, true, _) => LinkOutputKind::StaticNoPicExe,
|
||||
(_, true, _) => LinkOutputKind::StaticDylib,
|
||||
(_, false, _) => LinkOutputKind::DynamicDylib,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue