Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 2 new constants #720

Merged
merged 3 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/examples/src/readobj/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,9 @@ const FLAGS_SHF: &[Flag<u32>] = &flags!(
SHF_GROUP,
SHF_TLS,
SHF_COMPRESSED,
SHF_GNU_RETAIN,
SHF_GNU_MBIND,
SHF_EXCLUDE,
);
const FLAGS_SHF_MIPS: &[Flag<u32>] = &flags!(
SHF_MIPS_GPREL,
Expand Down
1 change: 1 addition & 0 deletions crates/examples/testfiles/elf/nostd-mipsel.o.readobj
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ SectionHeader {
Name: ".llvm_addrsig" (0x4B)
Type: 0x6FFF4C03
Flags: 0x80000000
SHF_EXCLUDE (0x80000000)
SHF_MIPS_STRINGS (0x80000000)
Address: 0x0
Offset: 0x118
Expand Down
4 changes: 4 additions & 0 deletions src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,10 @@ pub const SHF_TLS: u32 = 1 << 10;
pub const SHF_COMPRESSED: u32 = 1 << 11;
/// OS-specific section flags.
pub const SHF_MASKOS: u32 = 0x0ff0_0000;
/// Section should not be garbage collected by the linker.
pub const SHF_GNU_RETAIN: u32 = 1 << 21;
/// Mbind section.
pub const SHF_GNU_MBIND: u32 = 1 << 24;
/// Processor-specific section flags.
pub const SHF_MASKPROC: u32 = 0xf000_0000;
/// This section is excluded from the final executable or shared library.
Expand Down
Loading