Files
scriptc/scripts/llvm-package-symbols.mjs
Chris Tate c08ab955ae Enforce linting and consistent source formatting
- Enforce oxlint and oxfmt for owned JavaScript and TypeScript with independent CI checks.
- Preserve compiler import boundaries and protected fixtures while cleaning up lint findings.
- Standardize source formatting and validate import, fixture, and embedded-source protections.
2026-10-05 17:51:24 -05:00

11 lines
429 B
JavaScript

const MACHO_LINKER_GLOBALS = new Set(["__mh_execute_header"]);
/** Executables may expose Mach-O's linker-defined image-header symbol even
* when their exported-symbol list contains only the process entry point. */
export function validateLlvmHelperExports(symbols) {
return {
hasMain: symbols.includes("_main"),
unexpected: symbols.filter((symbol) => symbol !== "_main" && !MACHO_LINKER_GLOBALS.has(symbol)),
};
}