Commit Graph

15 Commits

Author SHA1 Message Date
Michael Tremer
8ac8abb269 stripper: Strip any PIE executables
Fixes: #12894
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-06 09:57:22 +00:00
Michael Tremer
1432531ac8 strip: Do not try to strip QEMU
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-22 19:41:39 +00:00
Michael Tremer
d79715dbf9 strip: Make this work when cross-compiling
The host might not have the correct tools to strip a foreign
architecture, therefore we need to use the cross tools.

The crosstools might be built in an architecture that they
cannot strip themselves and since they are not being part of the
packaged toolchain, we will just skip them.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-22 19:41:39 +00:00
Michael Tremer
f84c2cda03 strip: Dereference path if it is a symlink
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-05 12:14:00 +00:00
Michael Tremer
52e947f7f2 stripper: Actually use the path we want
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-05 12:13:11 +00:00
Michael Tremer
19054331c5 make.sh: Refactor stripper
This should *actually* exclude everything we want to exclude and
*actually* strip everything to the maximum.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-05 12:12:22 +00:00
Michael Tremer
131cfcf223 strip: Silence any warnings for files without capabilities
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-07-13 15:34:59 +00:00
Michael Tremer
37ef9fe4e0 stripper: Handle capabilities
During the build process, we set capabilities to elevate privileges of
certain progrems (e.g. ping). These have been removed during the build
process because of strip.

This patch collects any capabilities from all files that are being
stripped and restores them after calling strip.

Fixes: #12652
Reported-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-07-10 15:21:55 +00:00
Michael Tremer
25d5058974 stripper: Strip all unneeded relocation information
Libraries were treated differently and therfore it could
happen that they were not stripped from any unnecessary
relocation information at all.

This patch changes that and strips everything from
libraries that we do not need.

The ISO was 3MB smaller.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-12-29 19:20:44 +00:00
Michael Tremer
6c4cc7ea1b Move toolchain from /tools to /tools_${arch}
This will allow us to run multiple builds on the same
system at the same time (or at least have them on disk).

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-11-23 15:57:28 +00:00
Michael Tremer
2ee623a89a stripper: Fix for newer versions of file
The output has changed and this patch will now ignore any
additional output.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-06-07 10:34:58 +01:00
Michael Tremer
b98ca5fa2d stripper: Abort if stripping fails
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-06-07 10:34:43 +01:00
Michael Tremer
bc259fdcc1 Fix stripping. 2012-08-21 14:40:48 +02:00
Michael Tremer
d9bb523991 stripper: Strip static archives. 2012-08-15 19:06:27 +02:00
Michael Tremer
fc44fa1f06 Make stripping more efficient.
Finds all ELF objects and doesn't strip them twice.
2012-08-12 16:47:36 -04:00