blob: f36e9aacbfacef156878e54366ed6494346a179f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
.TH MCPU-STRIP 1 "October 2026" "LibMCPU" "User Commands"
.SH NAME
mcpu-strip \- safely remove non-runtime symbol metadata from MELF
.SH SYNOPSIS
.B mcpu-strip
.RI [ options ] " MELF-file"
.SH DESCRIPTION
.B mcpu-strip
is deliberately conservative. It removes ordinary non-allocated SHT_SYMTAB
metadata from ET_EXEC and ET_DYN only when no retained section depends on it,
and removes an associated ordinary string table only when it becomes
unreferenced.
.PP
ET_REL symbol tables are preserved because they are part of later link
semantics. Dynamic-linking tables, RELA sections, MCPU target/lifecycle
metadata, allocated/model sections and program headers are always preserved.
Current LibMCPU final-image writers are already compact, so stripping a normal
current ET_EXEC or ET_DYN may intentionally be a byte-for-byte no-op.
.SH OPTIONS
.TP
.BI -o " file"
.TQ
.BI --output= FILE
Write the result to FILE instead of replacing the input in place.
.TP
.B --help
Display help and exit.
.TP
.B --version
Display the program name, MCPU toolchain identity and version, then exit.
.TP
.B --dump-version
Display only the MCPU package version number and exit.
.SH IN-PLACE SAFETY
In-place replacement is performed through a temporary file in the same
directory followed by rename, while preserving the original file mode.
Allocated image bytes and program-header layout are not repacked by the safe
metadata policy.
.SH ARCHIVES
Deterministic MCPU static archives are processed member-by-member; link-critical
ET_REL symbol information remains intact.
.SH EXIT STATUS
Zero on success; nonzero on malformed input, dependency-safety or I/O error.
.SH EXAMPLES
.nf
mcpu-strip program
mcpu-strip -o program.stripped program
mcpu-strip libfoo.so.1
mcpu-strip libsimple.a
.fi
.SH SEE ALSO
.BR mcpu-objcopy (1),
.BR mcpu-readelf (1),
.BR mcpu-objdump (1),
.BR libmcpu (7)
|