Skip to content

feat: handle -z x86-64-* ISA needed#1320

Merged
mati865 merged 4 commits into
wild-linker:mainfrom
mati865:push-nvyomoyqtxzr
Nov 21, 2025
Merged

feat: handle -z x86-64-* ISA needed#1320
mati865 merged 4 commits into
wild-linker:mainfrom
mati865:push-nvyomoyqtxzr

Conversation

@mati865

@mati865 mati865 commented Nov 20, 2025

Copy link
Copy Markdown
Member

No description provided.

Comment thread libwild/src/args.rs
Comment on lines +1389 to +1420
.sub_option(
"x86-64-baseline",
"Mark x86-64-baseline ISA as needed",
|args, _modifier_stack, _value| {
args.z_isa = GNU_PROPERTY_X86_ISA_1_BASELINE;
Ok(())
},
)
.sub_option(
"x86-64-v2",
"Mark x86-64-v2 ISA as needed",
|args, _modifier_stack, _value| {
args.z_isa = GNU_PROPERTY_X86_ISA_1_V2;
Ok(())
},
)
.sub_option(
"x86-64-v3",
"Mark x86-64-v3 ISA as needed",
|args, _modifier_stack, _value| {
args.z_isa = GNU_PROPERTY_X86_ISA_1_V3;
Ok(())
},
)
.sub_option(
"x86-64-v4",
"Mark x86-64-v4 ISA as needed",
|args, _modifier_stack, _value| {
args.z_isa = GNU_PROPERTY_X86_ISA_1_V4;
Ok(())
},
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we list them when on non x86_64?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We support cross-linking, so I think we should list them

Comment thread libwild/src/args.rs Outdated
pub(crate) error_unresolved_symbols: bool,
pub(crate) allow_multiple_definitions: bool,
pub(crate) z_interpose: bool,
pub(crate) z_isa: u32,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe Option<NonZeroU32> would be better?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option<NonZeroU32> looks like it would fit nicely here, but either is fine by me.

@mati865 mati865 marked this pull request as ready for review November 20, 2025 19:58
@mati865 mati865 changed the title feat: handle -z x86-64 ISA needed feat: handle -z,x86-64-* ISA needed Nov 20, 2025
Comment thread libwild/src/args.rs
Comment on lines +1389 to +1420
.sub_option(
"x86-64-baseline",
"Mark x86-64-baseline ISA as needed",
|args, _modifier_stack, _value| {
args.z_isa = GNU_PROPERTY_X86_ISA_1_BASELINE;
Ok(())
},
)
.sub_option(
"x86-64-v2",
"Mark x86-64-v2 ISA as needed",
|args, _modifier_stack, _value| {
args.z_isa = GNU_PROPERTY_X86_ISA_1_V2;
Ok(())
},
)
.sub_option(
"x86-64-v3",
"Mark x86-64-v3 ISA as needed",
|args, _modifier_stack, _value| {
args.z_isa = GNU_PROPERTY_X86_ISA_1_V3;
Ok(())
},
)
.sub_option(
"x86-64-v4",
"Mark x86-64-v4 ISA as needed",
|args, _modifier_stack, _value| {
args.z_isa = GNU_PROPERTY_X86_ISA_1_V4;
Ok(())
},
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We support cross-linking, so I think we should list them

Comment thread libwild/src/args.rs Outdated
pub(crate) error_unresolved_symbols: bool,
pub(crate) allow_multiple_definitions: bool,
pub(crate) z_interpose: bool,
pub(crate) z_isa: u32,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option<NonZeroU32> looks like it would fit nicely here, but either is fine by me.

@mati865 mati865 changed the title feat: handle -z,x86-64-* ISA needed feat: handle -z x86-64-* ISA needed Nov 21, 2025
@mati865 mati865 merged commit 3520131 into wild-linker:main Nov 21, 2025
20 checks passed
@mati865 mati865 deleted the push-nvyomoyqtxzr branch November 21, 2025 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants