Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Limit - Reduce SYMBOL_NAME_LENGTH_MAXIMUM to 64 #470

Merged
merged 1 commit into from
Jun 1, 2023
Merged
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
Reduces SYMBOL_NAME_LENGTH_MAXIMUM to 64.
  • Loading branch information
Lichtso committed Jun 1, 2023
commit fbd4fbd5d550e1004e51536cd2367bb2585be3c2
2 changes: 1 addition & 1 deletion src/elf_parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{ArithmeticOverflow, ErrCheckedArithmetic};
use {consts::*, types::*};

const SECTION_NAME_LENGTH_MAXIMUM: usize = 16;
const SYMBOL_NAME_LENGTH_MAXIMUM: usize = 1024;
const SYMBOL_NAME_LENGTH_MAXIMUM: usize = 64;

Choose a reason for hiding this comment

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

This change makes it impossible to load files generated by our Move compiler. For example, this relocation triggers Unknown symbol error.

0000000000000578  000000250000000a R_BPF_64_32            000000000008d940 _ZN4core3fmt3num53_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$u16$GT$3fmt17hda2568c893a78314E

The symbol is 95 characters long. There are longer symbols in Move compiled modules too.


/// Error definitions
#[derive(Debug, PartialEq, Eq, thiserror::Error)]
Expand Down