Skip to content

Commit

Permalink
spcasm: remove unneeded pin
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinesfilmroellchen committed Nov 21, 2024
1 parent d14f30a commit b6ca082
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

use std::cell::Cell;
use std::io::Write;
use std::pin::Pin;

#[allow(unused)]
use flexstr::{shared_str, IntoSharedStr, SharedStr, ToSharedStr};
Expand Down Expand Up @@ -55,13 +54,12 @@ pub fn write_to_elf(
// - shstrtab section (section header string table)
// - Section headers (yes, weird position, but I don't want to mess with something that readelf accepts)

// TODO: Check if Pin is necessary here.
let mut segments: Vec<Pin<Box<SegmentMetadata>>> = Vec::new();
let mut segments: Vec<Box<SegmentMetadata>> = Vec::new();

// Step 1: Create metadata.
// Since segments is a BTreeMap, it will always be sorted by address, simplifying later write steps.
for (segment_start, segment_contents) in data.segments {
let metadata = Box::pin(SegmentMetadata {
let metadata = Box::new(SegmentMetadata {
name: format!(".text_{segment_start:04X}"),
name_id: Cell::new(None),
section_index: Cell::new(None),
Expand Down

0 comments on commit b6ca082

Please sign in to comment.