mirror of
https://github.com/morluto/rea.git
synced 2026-11-23 06:55:55 +00:00
refactor(elf): share fixed header declaration widths (#12391)
This commit is contained in:
1 parent
ad996352c3
commit
1ba93c8a1b
18 files changed
+184
-96
No files matched your search
@@ -17,7 +17,10 @@ import {
|
||||
} from "../../domain/peSectionHeader.js";
|
||||
import { readElfHeaderFacts } from "../../domain/elfFixedHeader.js";
|
||||
import { readElfRawTableDeclarations } from "../../domain/elfRawTableDeclarations.js";
|
||||
import { readElfSectionHeader } from "../../domain/elfSectionHeader.js";
|
||||
import {
|
||||
elfSectionHeaderWidth,
|
||||
readElfSectionHeader,
|
||||
} from "../../domain/elfSectionHeader.js";
|
||||
import { observeElfStringTableEntry } from "../../domain/elfStringTable.js";
|
||||
import {
|
||||
readFatContainerHeader,
|
||||
@@ -808,7 +811,7 @@ const elfClaims = async (
|
||||
const declarations = readElfRawTableDeclarations(header, format.value);
|
||||
if (!declarations.ok) return [];
|
||||
const { offset, width, count, namesIndex } = declarations.value.sections;
|
||||
const sectionWidth = elfClass === 64 ? 64 : 40;
|
||||
const sectionWidth = elfSectionHeaderWidth(elfClass);
|
||||
// Unsupported extended numbering does not establish a Bun graph.
|
||||
if (
|
||||
(width !== 0 && width !== sectionWidth) ||
|
||||
|
||||
Reference in new issue
Block a user