linkstore/embed/embedder/formats/
pe.rs

1use super::*;
2pub(super) fn discover_linkstores<'a, IO: BinaryHandle<'a> + 'a>(
3	embeds: &mut Linkstores,
4	handle: &mut BufReader<Cursor<&[u8]>>,
5	pe: &goblin::pe::PE,
6	ar_offset: u64,
7) -> Result<(), Error> {
8	for header in pe
9		.sections
10		.iter()
11		.filter_map(|section| filter_map_linkstore_section(&section.name, section))
12	{
13		Embedder::<IO>::decode_section(
14			embeds,
15			handle,
16			header.pointer_to_raw_data as _,
17			header.virtual_size as _,
18			pe.is_64,
19			true,
20			ar_offset,
21		)?;
22	}
23	Ok(())
24}